aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_dispatch/routing
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2014-05-30 10:46:00 -0700
committerAaron Patterson <aaron.patterson@gmail.com>2014-06-03 11:33:50 -0700
commita04767d77c342ff398cd7ff710b170ae321e558f (patch)
treeefa4f5fdd7642ed851585123191a7cae4f1204e2 /actionpack/lib/action_dispatch/routing
parentf28788b2575aaf4727b95290efa603355f7c32cb (diff)
downloadrails-a04767d77c342ff398cd7ff710b170ae321e558f.tar.gz
rails-a04767d77c342ff398cd7ff710b170ae321e558f.tar.bz2
rails-a04767d77c342ff398cd7ff710b170ae321e558f.zip
shorten up IGNORE_OPTIONS
since we are now passing the format value around, we can remove it from the options hash, which means we don't need to consult as many values from IGNORE_OPTIONS
Diffstat (limited to 'actionpack/lib/action_dispatch/routing')
-rw-r--r--actionpack/lib/action_dispatch/routing/mapper.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/actionpack/lib/action_dispatch/routing/mapper.rb b/actionpack/lib/action_dispatch/routing/mapper.rb
index a05aa9a838..fa3bb863d0 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 = [:to, :as, :via, :on, :constraints, :defaults, :only, :except, :anchor, :shallow, :shallow_path, :shallow_prefix, :format]
+ IGNORE_OPTIONS = [:to, :as, :via, :on, :constraints, :defaults, :only, :except, :anchor, :shallow, :shallow_path, :shallow_prefix]
ANCHOR_CHARACTERS_REGEX = %r{\A(\\A|\^)|(\\Z|\\z|\$)\Z}
attr_reader :scope, :options, :requirements, :conditions, :defaults
@@ -75,7 +75,7 @@ module ActionDispatch
@default_controller = options[:controller] || scope[:controller]
@default_action = options[:action] || scope[:action]
- formatted = options[:format]
+ formatted = options.delete :format
path = normalize_path! path, formatted
ast = path_ast path