diff options
Diffstat (limited to 'actionpack/lib/action_dispatch/routing/mapper.rb')
-rw-r--r-- | actionpack/lib/action_dispatch/routing/mapper.rb | 4 |
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 b3acac42fc..4ec1b8ee1f 100644 --- a/actionpack/lib/action_dispatch/routing/mapper.rb +++ b/actionpack/lib/action_dispatch/routing/mapper.rb @@ -1607,7 +1607,7 @@ module ActionDispatch def root(path, options = {}) if path.is_a?(String) options[:to] = path - elsif path.is_a?(Hash) and options.empty? + elsif path.is_a?(Hash) && options.empty? options = path else raise ArgumentError, "must be called with a path and/or options" @@ -1927,7 +1927,7 @@ to this: end def match_root_route(options) - name = has_named_route?(:root) ? nil : :root + name = has_named_route?(name_for_action(:root, nil)) ? nil : :root args = ["/", { as: name, via: :get }.merge!(options)] match(*args) |