aboutsummaryrefslogtreecommitdiffstats
path: root/actionmailer
diff options
context:
space:
mode:
authorPiotr Sarnacki <drogus@gmail.com>2010-08-04 17:15:34 +0200
committerPiotr Sarnacki <drogus@gmail.com>2010-09-03 22:59:12 +0200
commit56ef192374f7dc5b21120bbe94cacf852b33be54 (patch)
tree529d7f593c0ce3033e846105f26b331331d064a2 /actionmailer
parentf3c703a32f6c7833705e46b8e14f172330a1c916 (diff)
downloadrails-56ef192374f7dc5b21120bbe94cacf852b33be54.tar.gz
rails-56ef192374f7dc5b21120bbe94cacf852b33be54.tar.bz2
rails-56ef192374f7dc5b21120bbe94cacf852b33be54.zip
ActionMailer should not depend on ActionDispatch
Diffstat (limited to 'actionmailer')
-rw-r--r--actionmailer/lib/action_mailer.rb1
-rw-r--r--actionmailer/lib/action_mailer/base.rb3
-rw-r--r--actionmailer/lib/action_mailer/railtie.rb1
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) }