Permalink
Browse files

ActionMailer should not depend on ActionDispatch

  • Loading branch information...
1 parent f3c703a commit 56ef192374f7dc5b21120bbe94cacf852b33be54 @drogus drogus committed Aug 4, 2010
View
1 actionmailer/lib/action_mailer.rb
@@ -26,7 +26,6 @@
require 'abstract_controller'
require 'action_view'
-require 'action_dispatch'
# Common Active Support usage in Action Mailer
require 'active_support/core_ext/class'
View
3 actionmailer/lib/action_mailer/base.rb
@@ -340,7 +340,6 @@ class Base < AbstractController::Base
include AbstractController::Helpers
include AbstractController::Translation
include AbstractController::AssetPaths
- include AbstractController::UrlFor
cattr_reader :protected_instance_variables
@@protected_instance_variables = []
@@ -364,7 +363,7 @@ class Base < AbstractController::Base
class << self
def inherited(klass)
super(klass)
- klass.class_eval { @action_methods = nil }
+ klass.clear_action_methods!
end
def mailer_name
View
1 actionmailer/lib/action_mailer/railtie.rb
@@ -19,6 +19,7 @@ class Railtie < Rails::Railtie
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) }

0 comments on commit 56ef192

Please sign in to comment.