Defect #11776
Can't override mailer views inside redmine plugin.
Status: | Closed | Start date: | ||
---|---|---|---|---|
Priority: | Normal | Due date: | ||
Assignee: | % Done: | 0% | ||
Category: | Plugin API | |||
Target version: | 2.0.4 | |||
Resolution: | Fixed | Affected version: | 2.0.3 |
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.
Associated revisions
Let plugin override mailer views (#11776).
History
#1
Updated by Jean-Philippe Lang over 8 years ago
- Category set to Plugin API
- Target version set to 2.1.0
#2
Updated by Jean-Philippe Lang over 8 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.