aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_dispatch/routing/mapper.rb
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2014-05-30 11:55:36 -0700
committerAaron Patterson <aaron.patterson@gmail.com>2014-06-03 11:33:52 -0700
commit5b71006cac45714c1676c7e2576ee3460e41c62f (patch)
treef7df2f21da5e32f7b8230180b8dbebf1c2f3a47d /actionpack/lib/action_dispatch/routing/mapper.rb
parentc94504cf88b674d23ce472e97f7a3f21a3b43c12 (diff)
downloadrails-5b71006cac45714c1676c7e2576ee3460e41c62f.tar.gz
rails-5b71006cac45714c1676c7e2576ee3460e41c62f.tar.bz2
rails-5b71006cac45714c1676c7e2576ee3460e41c62f.zip
:only is never used in Mapping, so rm the key
Diffstat (limited to 'actionpack/lib/action_dispatch/routing/mapper.rb')
-rw-r--r--actionpack/lib/action_dispatch/routing/mapper.rb3
1 files changed, 2 insertions, 1 deletions
diff --git a/actionpack/lib/action_dispatch/routing/mapper.rb b/actionpack/lib/action_dispatch/routing/mapper.rb
index f1f4e389d6..ab5f8fbac6 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 = [:only, :except, :shallow, :shallow_path, :shallow_prefix]
+ IGNORE_OPTIONS = [:except, :shallow, :shallow_path, :shallow_prefix]
ANCHOR_CHARACTERS_REGEX = %r{\A(\\A|\^)|(\\Z|\\z|\$)\Z}
attr_reader :scope, :options, :requirements, :conditions, :defaults
@@ -1524,6 +1524,7 @@ module ActionDispatch
options[:as] = name_for_action(options[:as], action)
end
+ options.delete :only
mapping = Mapping.new(@scope, URI.parser.escape(path), options)
app, conditions, requirements, defaults, as, anchor = mapping.to_route
@set.add_route(app, conditions, requirements, defaults, as, anchor)