Permalink
Browse files

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
  • Loading branch information...
1 parent f28788b commit a04767d77c342ff398cd7ff710b170ae321e558f @tenderlove tenderlove committed May 30, 2014
Showing with 2 additions and 2 deletions.
  1. +2 −2 actionpack/lib/action_dispatch/routing/mapper.rb
@@ -60,7 +60,7 @@ def constraint_args(constraint, request)
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 @@ def initialize(scope, path, options)
@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

0 comments on commit a04767d

Please sign in to comment.