Permalink
Browse files

stop using a hash for parameterizing

  • Loading branch information...
1 parent 5f0b37c commit a05a9ff1cab1d90424a7d5eca2ade4ea800994ba @tenderlove tenderlove committed Sep 8, 2011
Showing with 9 additions and 11 deletions.
  1. +9 −11 actionpack/lib/action_dispatch/routing/route_set.rb
@@ -350,18 +350,16 @@ def add_route(app, conditions = {}, requirements = {}, defaults = {}, name = nil
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

0 comments on commit a05a9ff

Please sign in to comment.