diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2015-08-11 18:23:25 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2015-08-11 18:23:25 -0700 |
commit | cbf1617015091ed76345e8501a2bb234b3567a31 (patch) | |
tree | c1f862939f4da7347c5ab6587d566caea49a418a /actionpack/lib/action_dispatch | |
parent | 3420849f85d6991af87e84950a8ecc9cfa74c643 (diff) | |
download | rails-cbf1617015091ed76345e8501a2bb234b3567a31.tar.gz rails-cbf1617015091ed76345e8501a2bb234b3567a31.tar.bz2 rails-cbf1617015091ed76345e8501a2bb234b3567a31.zip |
only call `split_constraints` once
Diffstat (limited to 'actionpack/lib/action_dispatch')
-rw-r--r-- | actionpack/lib/action_dispatch/routing/mapper.rb | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/actionpack/lib/action_dispatch/routing/mapper.rb b/actionpack/lib/action_dispatch/routing/mapper.rb index f3e47ba1cf..a12f60e20d 100644 --- a/actionpack/lib/action_dispatch/routing/mapper.rb +++ b/actionpack/lib/action_dispatch/routing/mapper.rb @@ -99,22 +99,22 @@ module ActionDispatch options = normalize_options!(options, formatted, path_params, ast, modyoule) - constraints = constraints(options, path_params) - - split_constraints path_params, scope_constraints.merge(constraints) + constraints = scope_constraints.merge constraints(options, path_params) if options_constraints.is_a?(Hash) - split_constraints path_params, options_constraints options_constraints.each do |key, default| if URL_OPTIONS.include?(key) && (String === default || Fixnum === default) @defaults[key] ||= default end end @blocks = blocks + constraints.merge! options_constraints else @blocks = blocks(options_constraints) end + split_constraints path_params, constraints + normalize_format!(formatted) @conditions[:path_info] = path |