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
@ -533,7 +533,6 @@ def _generate_prefix(options = {})
|
||||
end
|
||||
|
||||
def url_for(options)
|
||||
finalize!
|
||||
options = (options || {}).reverse_merge!(default_url_options)
|
||||
|
||||
handle_positional_args(options)
|
||||
@ -559,7 +558,6 @@ def url_for(options)
|
||||
end
|
||||
|
||||
def call(env)
|
||||
finalize!
|
||||
@router.call(env)
|
||||
end
|
||||
|
||||
|
@ -42,7 +42,7 @@ def load_paths
|
||||
|
||||
def finalize!
|
||||
route_sets.each do |routes|
|
||||
ActiveSupport.on_load(:action_controller) { routes.finalize! }
|
||||
routes.finalize!
|
||||
end
|
||||
end
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user