Project

General

Profile

Actions

Defect #11776

closed

Can't override mailer views inside redmine plugin.

Added by Matt Andrews about 12 years ago. Updated about 12 years ago.

Status:
Closed
Priority:
Normal
Category:
Plugin API
Target version:
Start date:
Due date:
% Done:

0%

Estimated time:
Resolution:
Fixed
Affected version:

Description

You can't override mailer views as you can other views from within a redmine plugin.

I suspect the cause of the problem is inside /lib/redmine/plugin.rb line 83:-
http://www.redmine.org/projects/redmine/repository/entry/trunk/lib/redmine/plugin.rb

      if File.directory?(view_path)
        ActionController::Base.prepend_view_path(view_path)
      end


Should be:-
      if File.directory?(view_path)
        ActionController::Base.prepend_view_path(view_path)
        ActionMailer::Base.prepend_view_path(view_path)
      end


Because otherwise, as ActionMailer and ActionController inherit from the same class (AbstractController), any extra view path given to the ActionController won't be available to the ActionMailer.

Redmine version: 2.0.3.stable.10173 but it seems to have not been fixed yet in trunk too.

Actions #1

Updated by Jean-Philippe Lang about 12 years ago

  • Category set to Plugin API
  • Target version set to 2.1.0
Actions #2

Updated by Jean-Philippe Lang about 12 years ago

  • Status changed from New to Closed
  • Assignee set to Jean-Philippe Lang
  • Target version changed from 2.1.0 to 2.0.4
  • Resolution set to Fixed

Committed in r10304 and merged in 2.0-stable.

Actions

Also available in: Atom PDF