diff options
author | Aaron Batalion <aaron@hungrymachine.com> | 2008-11-24 02:24:19 -0500 |
---|---|---|
committer | David Heinemeier Hansson <david@loudthinking.com> | 2008-11-26 10:52:05 +0100 |
commit | fef6c32afe2276dffa0347e25808a86e7a101af1 (patch) | |
tree | 42a43392f0e478e7b752bfd885a4e91b08828487 /actionpack/lib/action_controller/routing/builder.rb | |
parent | 6599dd907f87875045005c3754fc7fe75c130c3e (diff) | |
download | rails-fef6c32afe2276dffa0347e25808a86e7a101af1.tar.gz rails-fef6c32afe2276dffa0347e25808a86e7a101af1.tar.bz2 rails-fef6c32afe2276dffa0347e25808a86e7a101af1.zip |
Added optimal formatted routes to rails, deprecating the formatted_* methods, and reducing routes creation by 50% [#1359 state:committed]
Signed-off-by: David Heinemeier Hansson <david@loudthinking.com>
Diffstat (limited to 'actionpack/lib/action_controller/routing/builder.rb')
-rw-r--r-- | actionpack/lib/action_controller/routing/builder.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/actionpack/lib/action_controller/routing/builder.rb b/actionpack/lib/action_controller/routing/builder.rb index d4e501e780..44d759444a 100644 --- a/actionpack/lib/action_controller/routing/builder.rb +++ b/actionpack/lib/action_controller/routing/builder.rb @@ -34,6 +34,8 @@ module ActionController def segment_for(string) segment = case string + when /\A\.(:format)?\// + OptionalFormatSegment.new when /\A:(\w+)/ key = $1.to_sym key == :controller ? ControllerSegment.new(key) : DynamicSegment.new(key) |