diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2014-05-30 11:42:31 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2014-06-03 11:33:52 -0700 |
commit | 82f115758e754cac78f753428085c76c04628bb4 (patch) | |
tree | f1406cb008998dc165f504c13c17d39932ba01c3 /actionpack | |
parent | 3346d52248877105f57345f51de68322fa7b1ac1 (diff) | |
download | rails-82f115758e754cac78f753428085c76c04628bb4.tar.gz rails-82f115758e754cac78f753428085c76c04628bb4.tar.bz2 rails-82f115758e754cac78f753428085c76c04628bb4.zip |
remove :constraints from IGNORE_OPTIONS
Diffstat (limited to 'actionpack')
-rw-r--r-- | actionpack/lib/action_dispatch/routing/mapper.rb | 9 |
1 files changed, 5 insertions, 4 deletions
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 |