From c91648b107a967123e523393962e92f89e989dcf Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Fri, 30 May 2014 10:50:58 -0700 Subject: remove :as and :anchor from IGNORE_OPTIONS --- actionpack/lib/action_dispatch/routing/mapper.rb | 8 +++++--- 1 file changed, 5 insertions(+), 3 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 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 -- cgit v1.2.3