diff options
author | Clemens Kofler <clemens@railway.at> | 2008-09-02 10:48:00 +0200 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2008-09-03 00:55:23 +0200 |
commit | 948ed346007f0383c51fd371d594576f0fc9d699 (patch) | |
tree | 31f492c094045b5fa24bad6ad1f17bf7c3deb52c /actionpack/lib/action_controller/routing | |
parent | ba3ecf53b4902a9a5943f4dcf2073fe413de4778 (diff) | |
download | rails-948ed346007f0383c51fd371d594576f0fc9d699.tar.gz rails-948ed346007f0383c51fd371d594576f0fc9d699.tar.bz2 rails-948ed346007f0383c51fd371d594576f0fc9d699.zip |
Some performance goodness for routing.
Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
Diffstat (limited to 'actionpack/lib/action_controller/routing')
-rw-r--r-- | actionpack/lib/action_controller/routing/segments.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/actionpack/lib/action_controller/routing/segments.rb b/actionpack/lib/action_controller/routing/segments.rb index 9d4b740a44..e5f174ae2c 100644 --- a/actionpack/lib/action_controller/routing/segments.rb +++ b/actionpack/lib/action_controller/routing/segments.rb @@ -160,7 +160,7 @@ module ActionController s << "\n#{expiry_statement}" end - def interpolation_chunk(value_code = "#{local_name}") + def interpolation_chunk(value_code = local_name) "\#{URI.escape(#{value_code}.to_s, ActionController::Routing::Segment::UNSAFE_PCHAR)}" end @@ -231,7 +231,7 @@ module ActionController end # Don't URI.escape the controller name since it may contain slashes. - def interpolation_chunk(value_code = "#{local_name}") + def interpolation_chunk(value_code = local_name) "\#{#{value_code}.to_s}" end @@ -251,7 +251,7 @@ module ActionController end class PathSegment < DynamicSegment #:nodoc: - def interpolation_chunk(value_code = "#{local_name}") + def interpolation_chunk(value_code = local_name) "\#{#{value_code}}" end |