mirror of
https://github.com/github/rails.git
synced 2026-04-26 03:00:59 -04:00
Do not require passing :app to mounted helpers, it's actually useless and not DRY
This commit is contained in:
@@ -21,7 +21,7 @@ module ActionMailer
|
||||
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
|
||||
|
||||
@@ -27,7 +27,7 @@ module ActionController
|
||||
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) }
|
||||
|
||||
@@ -262,7 +262,7 @@ module ActionDispatch
|
||||
module MountedHelpers
|
||||
end
|
||||
|
||||
def mounted_helpers(name = nil)
|
||||
def mounted_helpers(name = :app)
|
||||
define_mounted_helper(name) if name
|
||||
MountedHelpers
|
||||
end
|
||||
|
||||
@@ -72,7 +72,7 @@ module TestGenerationPrefix
|
||||
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user