From 82f115758e754cac78f753428085c76c04628bb4 Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Fri, 30 May 2014 11:42:31 -0700 Subject: remove :constraints from IGNORE_OPTIONS --- actionpack/lib/action_dispatch/routing/mapper.rb | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'actionpack/lib/action_dispatch/routing') diff --git a/actionpack/lib/action_dispatch/routing/mapper.rb b/actionpack/lib/action_dispatch/routing/mapper.rb index 0852bd07a6..1a9c843175 100644 --- a/actionpack/lib/action_dispatch/routing/mapper.rb +++ b/actionpack/lib/action_dispatch/routing/mapper.rb @@ -60,7 +60,7 @@ module ActionDispatch end class Mapping #:nodoc: - IGNORE_OPTIONS = [:constraints, :defaults, :only, :except, :shallow, :shallow_path, :shallow_prefix] + IGNORE_OPTIONS = [:defaults, :only, :except, :shallow, :shallow_path, :shallow_prefix] ANCHOR_CHARACTERS_REGEX = %r{\A(\\A|\^)|(\\Z|\\z|\$)\Z} attr_reader :scope, :options, :requirements, :conditions, :defaults @@ -79,7 +79,8 @@ module ActionDispatch formatted = options.delete :format via = Array(options.delete(:via) { [] }) - @blocks = blocks(options[:constraints], scope[:blocks]) + options_constraints = options.delete :constraints + @blocks = blocks(options_constraints, scope[:blocks]) path = normalize_path! path, formatted ast = path_ast path @@ -87,11 +88,11 @@ module ActionDispatch @options = normalize_options!(options, formatted, path_params, ast) - constraints = constraints(options[:constraints], scope[:constraints]) + constraints = constraints(options_constraints, scope[:constraints]) normalize_requirements!(path_params, formatted, constraints) normalize_conditions!(path_params, path, ast, via, constraints) - normalize_defaults!(formatted, options[:constraints]) + normalize_defaults!(formatted, options_constraints) end def to_route -- cgit v1.2.3