1
0
Fork 0
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:
José Valim 2012-01-06 17:04:34 +01:00
parent 3853b73bf8
commit 0db93941a4
2 changed files with 1 additions and 3 deletions

View file

@ -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

View file

@ -42,7 +42,7 @@ module Rails
def finalize!
route_sets.each do |routes|
ActiveSupport.on_load(:action_controller) { routes.finalize! }
routes.finalize!
end
end