diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2014-05-30 15:21:38 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2014-06-03 11:33:53 -0700 |
commit | 522038aa9dc7d9759520d63b1c9d13086bdb3a21 (patch) | |
tree | e54ce57388da9939fc66a8dcb0bec529a4e07637 /actionpack | |
parent | 5029c371fe398c915b0291be7ea54a8937cffa76 (diff) | |
download | rails-522038aa9dc7d9759520d63b1c9d13086bdb3a21.tar.gz rails-522038aa9dc7d9759520d63b1c9d13086bdb3a21.tar.bz2 rails-522038aa9dc7d9759520d63b1c9d13086bdb3a21.zip |
move options_constraints tests next to each other
Diffstat (limited to 'actionpack')
-rw-r--r-- | actionpack/lib/action_dispatch/routing/mapper.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/actionpack/lib/action_dispatch/routing/mapper.rb b/actionpack/lib/action_dispatch/routing/mapper.rb index 377d09a515..c588cafebd 100644 --- a/actionpack/lib/action_dispatch/routing/mapper.rb +++ b/actionpack/lib/action_dispatch/routing/mapper.rb @@ -81,8 +81,6 @@ module ActionDispatch via = Array(options.delete(:via) { [] }) options_constraints = options.delete :constraints - @blocks = blocks(options_constraints, scope[:blocks]) - path = normalize_path! path, formatted ast = path_ast path path_params = path_params ast @@ -95,6 +93,8 @@ module ActionDispatch split_constraints path_params, constraints + @blocks = blocks(options_constraints, scope[:blocks]) + if options_constraints.is_a?(Hash) split_constraints path_params, options_constraints options_constraints.each do |key, default| |