mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Do not require passing :app to mounted helpers, it's actually useless and not DRY
This commit is contained in:
parent
a5d894ce56
commit
18aee33335
4 changed files with 4 additions and 4 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue