diff options
-rw-r--r-- | actionmailer/lib/action_mailer.rb | 1 | ||||
-rw-r--r-- | actionmailer/lib/action_mailer/base.rb | 3 | ||||
-rw-r--r-- | actionmailer/lib/action_mailer/railtie.rb | 1 |
3 files changed, 2 insertions, 3 deletions
diff --git a/actionmailer/lib/action_mailer.rb b/actionmailer/lib/action_mailer.rb index 706ba74c2d..05ba12197a 100644 --- a/actionmailer/lib/action_mailer.rb +++ b/actionmailer/lib/action_mailer.rb @@ -26,7 +26,6 @@ $:.unshift(actionpack_path) if File.directory?(actionpack_path) && !$:.include?( require 'abstract_controller' require 'action_view' -require 'action_dispatch' # Common Active Support usage in Action Mailer require 'active_support/core_ext/class' diff --git a/actionmailer/lib/action_mailer/base.rb b/actionmailer/lib/action_mailer/base.rb index f7acb36341..b70121d544 100644 --- a/actionmailer/lib/action_mailer/base.rb +++ b/actionmailer/lib/action_mailer/base.rb @@ -340,7 +340,6 @@ module ActionMailer #:nodoc: include AbstractController::Helpers include AbstractController::Translation include AbstractController::AssetPaths - include AbstractController::UrlFor cattr_reader :protected_instance_variables @@protected_instance_variables = [] @@ -364,7 +363,7 @@ module ActionMailer #:nodoc: class << self def inherited(klass) super(klass) - klass.class_eval { @action_methods = nil } + klass.clear_action_methods! end def mailer_name diff --git a/actionmailer/lib/action_mailer/railtie.rb b/actionmailer/lib/action_mailer/railtie.rb index 9468fd03e2..a2b00addc9 100644 --- a/actionmailer/lib/action_mailer/railtie.rb +++ b/actionmailer/lib/action_mailer/railtie.rb @@ -19,6 +19,7 @@ module ActionMailer options.stylesheets_dir ||= paths.public.stylesheets.to_a.first ActiveSupport.on_load(:action_mailer) do + include AbstractController::UrlFor extend ::AbstractController::Railties::RoutesHelpers.with(app.routes) include app.routes.mounted_helpers(:app) options.each { |k,v| send("#{k}=", v) } |