diff options
author | José Valim <jose.valim@gmail.com> | 2010-09-27 20:42:02 +0200 |
---|---|---|
committer | José Valim <jose.valim@gmail.com> | 2010-09-27 20:43:56 +0200 |
commit | 6067d1620075c1c311bbae01993453cd80967804 (patch) | |
tree | a6bbb495255db6e4fd30e8209316a768b5691350 /actionmailer | |
parent | e1b51955f15e91f3f1705612fd0aca82a257e2f4 (diff) | |
download | rails-6067d1620075c1c311bbae01993453cd80967804.tar.gz rails-6067d1620075c1c311bbae01993453cd80967804.tar.bz2 rails-6067d1620075c1c311bbae01993453cd80967804.zip |
Call it compile_methods! and do the same on AM.
Diffstat (limited to 'actionmailer')
-rw-r--r-- | actionmailer/lib/action_mailer/railtie.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/actionmailer/lib/action_mailer/railtie.rb b/actionmailer/lib/action_mailer/railtie.rb index 889ae34407..86136bdafd 100644 --- a/actionmailer/lib/action_mailer/railtie.rb +++ b/actionmailer/lib/action_mailer/railtie.rb @@ -18,6 +18,10 @@ module ActionMailer options.javascripts_dir ||= paths.public.javascripts.to_a.first options.stylesheets_dir ||= paths.public.stylesheets.to_a.first + # make sure readers methods get compiled + options.asset_path ||= nil + options.asset_host ||= nil + ActiveSupport.on_load(:action_mailer) do include AbstractController::UrlFor extend ::AbstractController::Railties::RoutesHelpers.with(app.routes) @@ -25,5 +29,11 @@ module ActionMailer options.each { |k,v| send("#{k}=", v) } end end + + initializer "action_mailer.compile_config_methods" do + ActiveSupport.on_load(:action_mailer) do + config.compile_methods! if config.respond_to?(:compile_methods!) + end + end end end |