From 522038aa9dc7d9759520d63b1c9d13086bdb3a21 Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Fri, 30 May 2014 15:21:38 -0700 Subject: move options_constraints tests next to each other --- actionpack/lib/action_dispatch/routing/mapper.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'actionpack/lib') 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| -- cgit v1.2.3