aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_dispatch/journey/route.rb
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2016-10-29 01:05:58 -0200
committerRafael Mendonça França <rafaelmfranca@gmail.com>2016-10-29 01:17:49 -0200
commitfe1f4b2ad56f010a4e9b93d547d63a15953d9dc2 (patch)
tree49257bdeadca12d5b167800a25d58dd50c0d6ddb /actionpack/lib/action_dispatch/journey/route.rb
parentf81a5ffbdec6c1d748aaef02ba10a6e0d86cbf3f (diff)
downloadrails-fe1f4b2ad56f010a4e9b93d547d63a15953d9dc2.tar.gz
rails-fe1f4b2ad56f010a4e9b93d547d63a15953d9dc2.tar.bz2
rails-fe1f4b2ad56f010a4e9b93d547d63a15953d9dc2.zip
Add more rubocop rules about whitespaces
Diffstat (limited to 'actionpack/lib/action_dispatch/journey/route.rb')
-rw-r--r--actionpack/lib/action_dispatch/journey/route.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/actionpack/lib/action_dispatch/journey/route.rb b/actionpack/lib/action_dispatch/journey/route.rb
index 79cd010d64..0cc8d83ac8 100644
--- a/actionpack/lib/action_dispatch/journey/route.rb
+++ b/actionpack/lib/action_dispatch/journey/route.rb
@@ -83,7 +83,7 @@ module ActionDispatch
def requirements
# needed for rails `rails routes`
- @defaults.merge(path.requirements).delete_if { |_,v|
+ @defaults.merge(path.requirements).delete_if { |_, v|
/.+?/ == v
}
end
@@ -98,7 +98,7 @@ module ActionDispatch
def score(constraints)
required_keys = path.required_names
- supplied_keys = constraints.map { |k,v| v && k.to_s }.compact
+ supplied_keys = constraints.map { |k, v| v && k.to_s }.compact
return -1 unless (required_keys - supplied_keys).empty?
@@ -124,7 +124,7 @@ module ActionDispatch
end
def required_defaults
- @required_defaults ||= @defaults.dup.delete_if do |k,_|
+ @required_defaults ||= @defaults.dup.delete_if do |k, _|
parts.include?(k) || !required_default?(k)
end
end