diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2011-09-08 10:52:04 -0700 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2011-09-12 16:50:47 -0700 |
commit | a05a9ff1cab1d90424a7d5eca2ade4ea800994ba (patch) | |
tree | 3ad4e213f10334929593ac515739a2bbf5aff36d /actionpack/lib/action_dispatch/routing | |
parent | 5f0b37c486dcc735b5817852932e761f5ff60152 (diff) | |
download | rails-a05a9ff1cab1d90424a7d5eca2ade4ea800994ba.tar.gz rails-a05a9ff1cab1d90424a7d5eca2ade4ea800994ba.tar.bz2 rails-a05a9ff1cab1d90424a7d5eca2ade4ea800994ba.zip |
stop using a hash for parameterizing
Diffstat (limited to 'actionpack/lib/action_dispatch/routing')
-rw-r--r-- | actionpack/lib/action_dispatch/routing/route_set.rb | 20 |
1 files changed, 9 insertions, 11 deletions
diff --git a/actionpack/lib/action_dispatch/routing/route_set.rb b/actionpack/lib/action_dispatch/routing/route_set.rb index 2067c187e7..66db1c629f 100644 --- a/actionpack/lib/action_dispatch/routing/route_set.rb +++ b/actionpack/lib/action_dispatch/routing/route_set.rb @@ -350,18 +350,16 @@ module ActionDispatch end class Generator #:nodoc: - PARAMETERIZE = { - :parameterize => lambda do |name, value| - if name == :controller - value - elsif value.is_a?(Array) - value.map { |v| Rack::Mount::Utils.escape_uri(v.to_param) }.join('/') - else - return nil unless param = value.to_param - param.split('/').map { |v| Rack::Mount::Utils.escape_uri(v) }.join("/") - end + PARAMETERIZE = lambda do |name, value| + if name == :controller + value + elsif value.is_a?(Array) + value.map { |v| Rack::Mount::Utils.escape_uri(v.to_param) }.join('/') + else + return nil unless param = value.to_param + param.split('/').map { |v| Rack::Mount::Utils.escape_uri(v) }.join("/") end - } + end attr_reader :options, :recall, :set, :named_route |