Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

Edge forces ActionMailer view path to be ActionView's

#1883

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.

Reported by Kyle Hargraves · February 5th, 2009 @ 01:13 PM

State: resolved
Milestone: none
Assigned to: josh josh
Importance: none

Activity

  1. Kyle Hargraves
  2. DHH
    DHH
    • Assigned user set to Yehuda Katz (wycats)
    • Milestone cleared.

    February 6th, 2009 @ 01:42 PM

  3. josh
    josh
    • Assigned user changed from Yehuda Katz (wycats) to josh
    • State changed from new to resolved

    February 22nd, 2009 @ 04:43 PM