aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_dispatch/journey/route.rb
diff options
context:
space:
mode:
authorErik Michaels-Ober <sferik@gmail.com>2014-10-27 17:28:53 +0100
committerErik Michaels-Ober <sferik@gmail.com>2014-11-29 11:53:24 +0100
commitd1374f99bf3090f3e659687c112ed0c5c0865cfb (patch)
treee87455ea620155254511180cc1f08c5544ed195c /actionpack/lib/action_dispatch/journey/route.rb
parent56e47cf66d2e3009b4032d0cd2ceb1a6e5e42573 (diff)
downloadrails-d1374f99bf3090f3e659687c112ed0c5c0865cfb.tar.gz
rails-d1374f99bf3090f3e659687c112ed0c5c0865cfb.tar.bz2
rails-d1374f99bf3090f3e659687c112ed0c5c0865cfb.zip
Pass symbol as an argument instead of a block
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 9f0a3af902..3b609a184d 100644
--- a/actionpack/lib/action_dispatch/journey/route.rb
+++ b/actionpack/lib/action_dispatch/journey/route.rb
@@ -60,7 +60,7 @@ module ActionDispatch
end
def parts
- @parts ||= segments.map { |n| n.to_sym }
+ @parts ||= segments.map(&:to_sym)
end
alias :segment_keys :parts
@@ -69,11 +69,11 @@ module ActionDispatch
end
def optional_parts
- path.optional_names.map { |n| n.to_sym }
+ path.optional_names.map(&:to_sym)
end
def required_parts
- @required_parts ||= path.required_names.map { |n| n.to_sym }
+ @required_parts ||= path.required_names.map(&:to_sym)
end
def required_default?(key)