aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_dispatch/routing
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2014-05-30 10:50:58 -0700
committerAaron Patterson <aaron.patterson@gmail.com>2014-06-03 11:33:50 -0700
commitc91648b107a967123e523393962e92f89e989dcf (patch)
tree84bc1c65a59bff0b085ae186e19e707289036238 /actionpack/lib/action_dispatch/routing
parent54917109344a080397ce73023df3b973f251f7e9 (diff)
downloadrails-c91648b107a967123e523393962e92f89e989dcf.tar.gz
rails-c91648b107a967123e523393962e92f89e989dcf.tar.bz2
rails-c91648b107a967123e523393962e92f89e989dcf.zip
remove :as and :anchor from IGNORE_OPTIONS
Diffstat (limited to 'actionpack/lib/action_dispatch/routing')
-rw-r--r--actionpack/lib/action_dispatch/routing/mapper.rb8
1 files changed, 5 insertions, 3 deletions
diff --git a/actionpack/lib/action_dispatch/routing/mapper.rb b/actionpack/lib/action_dispatch/routing/mapper.rb
index 708f0a2b43..961c3afd91 100644
--- a/actionpack/lib/action_dispatch/routing/mapper.rb
+++ b/actionpack/lib/action_dispatch/routing/mapper.rb
@@ -60,11 +60,11 @@ module ActionDispatch
end
class Mapping #:nodoc:
- IGNORE_OPTIONS = [:as, :via, :on, :constraints, :defaults, :only, :except, :anchor, :shallow, :shallow_path, :shallow_prefix]
+ IGNORE_OPTIONS = [:via, :on, :constraints, :defaults, :only, :except, :shallow, :shallow_path, :shallow_prefix]
ANCHOR_CHARACTERS_REGEX = %r{\A(\\A|\^)|(\\Z|\\z|\$)\Z}
attr_reader :scope, :options, :requirements, :conditions, :defaults
- attr_reader :to, :default_controller, :default_action
+ attr_reader :to, :default_controller, :default_action, :as, :anchor
def initialize(scope, path, options)
@scope = scope
@@ -74,6 +74,8 @@ module ActionDispatch
@to = options.delete :to
@default_controller = options[:controller] || scope[:controller]
@default_action = options[:action] || scope[:action]
+ @as = options.delete :as
+ @anchor = options.delete :anchor
formatted = options.delete :format
@@ -87,7 +89,7 @@ module ActionDispatch
end
def to_route
- [ app, conditions, requirements, defaults, options[:as], options[:anchor] ]
+ [ app, conditions, requirements, defaults, as, anchor ]
end
private