diff options
author | Alberto Almagro <albertoalmagro@gmail.com> | 2018-12-11 23:45:57 +0100 |
---|---|---|
committer | Alberto Almagro <albertoalmagro@gmail.com> | 2019-05-22 23:03:56 +0200 |
commit | 29506d0f03a76b09497d1a392ef1adbddf776102 (patch) | |
tree | e210cd36f48e5f95f9417b4fba933752ddffd294 /actionpack/lib/action_dispatch/routing | |
parent | fb9117e190e39872fff7ae5d6b96bfb26ef8b32c (diff) | |
download | rails-29506d0f03a76b09497d1a392ef1adbddf776102.tar.gz rails-29506d0f03a76b09497d1a392ef1adbddf776102.tar.bz2 rails-29506d0f03a76b09497d1a392ef1adbddf776102.zip |
Use keyword arguments for ActionDispatch::Journey:Route constructor
This commit changes from constructor's argument list to keyword
arguments in order to remove the dependency of remember parameters'
positions.
The constructor already provided a default value for `internal`, this
commits takes the chance to also add default values for `precedence` and
`scope_options`.
Diffstat (limited to 'actionpack/lib/action_dispatch/routing')
-rw-r--r-- | actionpack/lib/action_dispatch/routing/mapper.rb | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/actionpack/lib/action_dispatch/routing/mapper.rb b/actionpack/lib/action_dispatch/routing/mapper.rb index 695eed3adc..6000524796 100644 --- a/actionpack/lib/action_dispatch/routing/mapper.rb +++ b/actionpack/lib/action_dispatch/routing/mapper.rb @@ -161,8 +161,10 @@ module ActionDispatch end def make_route(name, precedence) - Journey::Route.new(name, application, path, conditions, required_defaults, - defaults, request_method, precedence, scope_options, @internal) + Journey::Route.new(name: name, app: application, path: path, constraints: conditions, + required_defaults: required_defaults, defaults: defaults, + request_method_match: request_method, precedence: precedence, + scope_options: scope_options, internal: @internal) end def application |