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.rb32
1 files changed, 16 insertions, 16 deletions
diff --git a/actionpack/lib/action_dispatch/routing/mapper.rb b/actionpack/lib/action_dispatch/routing/mapper.rb
index 7034f25b09..a6b177480d 100644
--- a/actionpack/lib/action_dispatch/routing/mapper.rb
+++ b/actionpack/lib/action_dispatch/routing/mapper.rb
@@ -1684,7 +1684,7 @@ to this:
end
as = if !options.fetch(:as, true) # if it's set to nil or false
- options.delete(:as)
+ options.delete(:as)
else
name_for_action(options.delete(:as), action)
end
@@ -1914,24 +1914,24 @@ to this:
end
private
- def path_scope(path)
- @scope = @scope.new(path: merge_path_scope(@scope[:path], path))
- yield
- ensure
- @scope = @scope.parent
- end
+ def path_scope(path)
+ @scope = @scope.new(path: merge_path_scope(@scope[:path], path))
+ yield
+ ensure
+ @scope = @scope.parent
+ end
- def match_root_route(options)
- name = has_named_route?(:root) ? nil : :root
- defaults_option = options.delete(:defaults)
- args = ["/", { as: name, via: :get }.merge!(options)]
+ def match_root_route(options)
+ name = has_named_route?(:root) ? nil : :root
+ defaults_option = options.delete(:defaults)
+ args = ["/", { as: name, via: :get }.merge!(options)]
- if defaults_option
- defaults(defaults_option) { match(*args) }
- else
- match(*args)
+ if defaults_option
+ defaults(defaults_option) { match(*args) }
+ else
+ match(*args)
+ end
end
- end
end
# Routing Concerns allow you to declare common routes that can be reused