Project

General

Profile

Actions

Defect #11776

closed

Can't override mailer views inside redmine plugin.

Added by Matt Andrews over 11 years ago. Updated over 11 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

Also available in: Atom PDF