diff options
Diffstat (limited to 'actionmailer/lib/action_mailer')
-rw-r--r-- | actionmailer/lib/action_mailer/railtie.rb | 17 |
1 files changed, 6 insertions, 11 deletions
diff --git a/actionmailer/lib/action_mailer/railtie.rb b/actionmailer/lib/action_mailer/railtie.rb index d7b09b2dc6..ce6d8cc5b5 100644 --- a/actionmailer/lib/action_mailer/railtie.rb +++ b/actionmailer/lib/action_mailer/railtie.rb @@ -10,21 +10,16 @@ module ActionMailer end initializer "action_mailer.set_configs" do |app| - paths = app.config.paths - am = app.config.action_mailer + paths = app.config.paths + options = app.config.action_mailer - am.assets_dir ||= paths.public.to_a.first - am.javascripts_dir ||= paths.public.javascripts.to_a.first - am.stylesheets_dir ||= paths.public.stylesheets.to_a.first + options.assets_dir ||= paths.public.to_a.first + options.javascripts_dir ||= paths.public.javascripts.to_a.first + options.stylesheets_dir ||= paths.public.stylesheets.to_a.first ActiveSupport.on_load(:action_mailer) do - self.config.merge!(am) - include app.routes.url_helpers - - app.config.action_mailer.each do |k,v| - send "#{k}=", v - end + options.each { |k,v| send("#{k}=", v) } end end end |