aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_controller/routing/builder.rb
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/lib/action_controller/routing/builder.rb')
-rw-r--r--actionpack/lib/action_controller/routing/builder.rb2
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)