Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Do not require passing :app to mounted helpers, it's actually useless…

… and not DRY
  • Loading branch information...
commit 18aee333359a4dea6847754f3055ce223aa2474c 1 parent a5d894c
@drogus drogus authored
View
2  actionmailer/lib/action_mailer/railtie.rb
@@ -21,7 +21,7 @@ class Railtie < Rails::Railtie
ActiveSupport.on_load(:action_mailer) do
include AbstractController::UrlFor
extend ::AbstractController::Railties::RoutesHelpers.with(app.routes)
- include app.routes.mounted_helpers(:app)
+ include app.routes.mounted_helpers
options.each { |k,v| send("#{k}=", v) }
end
end
View
2  actionpack/lib/action_controller/railtie.rb
@@ -27,7 +27,7 @@ class Railtie < Rails::Railtie
options.page_cache_directory ||= paths.public.to_a.first
ActiveSupport.on_load(:action_controller) do
- include app.routes.mounted_helpers(:app)
+ include app.routes.mounted_helpers
extend ::AbstractController::Railties::RoutesHelpers.with(app.routes)
extend ::ActionController::Railties::Paths.with(app)
options.each { |k,v| send("#{k}=", v) }
View
2  actionpack/lib/action_dispatch/routing/route_set.rb
@@ -262,7 +262,7 @@ def install_helpers(destinations = [ActionController::Base, ActionView::Base], r
module MountedHelpers
end
- def mounted_helpers(name = nil)
+ def mounted_helpers(name = :app)
define_mounted_helper(name) if name
MountedHelpers
end
View
2  actionpack/test/dispatch/prefix_generation_test.rb
@@ -72,7 +72,7 @@ def klass.name; self end
class ::InsideEngineGeneratingController < ActionController::Base
include BlogEngine.routes.url_helpers
- include RailsApplication.routes.mounted_helpers(:app)
+ include RailsApplication.routes.mounted_helpers
def index
render :text => posts_path

0 comments on commit 18aee33

Please sign in to comment.
Something went wrong with that request. Please try again.