This project is archived and is in readonly mode.
Edge forces ActionMailer view path to be ActionView's
Reported by Kyle Hargraves | February 5th, 2009 @ 01:13 PM
One of my common tweaks to the Rails file structure is to move my mailers into app/mailers, and their views into app/mailers/views. This is no longer easily possible in environment.rb or an initializer, because railties/lib/initializer.rb calls 'load_view_paths' after the environment, application initializers, and after_initialize blocks are run. That method forcibly assigns ActionViews' path to ActionMailer.
This is reproducible by setting config.action_mailer.template_root in any of the above parts of the startup process, and then checking it's value in script/console.
I've fixed this in my own application simply by changing the assignment to be ||= rather than =, but I'm sure this is not a proper fix, and the view path cache code is a bit beyond me.
Comments and changes to this ticket
-
DHH February 6th, 2009 @ 01:42 PM
- Assigned user set to Yehuda Katz (wycats)
- Milestone cleared.
-
josh February 22nd, 2009 @ 04:43 PM
- Assigned user changed from Yehuda Katz (wycats) to josh
- State changed from new to resolved
Resolved #1712
Create your profile
Help contribute to this project by taking a few moments to create your personal profile. Create your profile »
<h2 style="font-size: 14px">Tickets have moved to Github</h2>
The new ticket tracker is available at <a href="https://github.com/rails/rails/issues">https://github.com/rails/rails/issues</a>