mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
We should finalize the routes as soon as possible and not wait for the controller to be loaded.
This commit is contained in:
parent
3853b73bf8
commit
0db93941a4
2 changed files with 1 additions and 3 deletions
|
@ -533,7 +533,6 @@ module ActionDispatch
|
|||
end
|
||||
|
||||
def url_for(options)
|
||||
finalize!
|
||||
options = (options || {}).reverse_merge!(default_url_options)
|
||||
|
||||
handle_positional_args(options)
|
||||
|
@ -559,7 +558,6 @@ module ActionDispatch
|
|||
end
|
||||
|
||||
def call(env)
|
||||
finalize!
|
||||
@router.call(env)
|
||||
end
|
||||
|
||||
|
|
|
@ -42,7 +42,7 @@ module Rails
|
|||
|
||||
def finalize!
|
||||
route_sets.each do |routes|
|
||||
ActiveSupport.on_load(:action_controller) { routes.finalize! }
|
||||
routes.finalize!
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue