aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_dispatch/routing/mapper.rb
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/lib/action_dispatch/routing/mapper.rb')
-rw-r--r--actionpack/lib/action_dispatch/routing/mapper.rb10
1 files changed, 5 insertions, 5 deletions
diff --git a/actionpack/lib/action_dispatch/routing/mapper.rb b/actionpack/lib/action_dispatch/routing/mapper.rb
index a6b177480d..3f4f920a87 100644
--- a/actionpack/lib/action_dispatch/routing/mapper.rb
+++ b/actionpack/lib/action_dispatch/routing/mapper.rb
@@ -41,7 +41,7 @@ module ActionDispatch
end
def serve(req)
- return [ 404, {"X-Cascade" => "pass"}, [] ] unless matches?(req)
+ return [ 404, { "X-Cascade" => "pass" }, [] ] unless matches?(req)
@strategy.call @app, req
end
@@ -270,7 +270,7 @@ module ActionDispatch
{ requirements: { format: Regexp.compile(formatted) },
defaults: { format: formatted } }
else
- { requirements: { }, defaults: { } }
+ { requirements: {}, defaults: {} }
end
end
@@ -1685,9 +1685,9 @@ to this:
as = if !options.fetch(:as, true) # if it's set to nil or false
options.delete(:as)
- else
- name_for_action(options.delete(:as), action)
- end
+ else
+ name_for_action(options.delete(:as), action)
+ end
path = Mapping.normalize_path URI.parser.escape(path), formatted
ast = Journey::Parser.parse path