diff options
Diffstat (limited to 'actionpack/lib')
-rw-r--r-- | actionpack/lib/action_controller/routing.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/actionpack/lib/action_controller/routing.rb b/actionpack/lib/action_controller/routing.rb index d0726e8a8b..f52b78cc75 100644 --- a/actionpack/lib/action_controller/routing.rb +++ b/actionpack/lib/action_controller/routing.rb @@ -329,8 +329,8 @@ module ActionController def write_recognition(g) raise RoutingError, "Path components must occur last" unless g.after.empty? - start = g.index_name - start = "(#{start})" unless /^\w+$/ =~ start + start = g.index_name.to_s + start = "(#{start})" unless /^\w+$/ =~ start.to_s value_expr = "#{g.path_name}[#{start}..-1] || []" g.result key, "ActionController::Routing::PathComponent::Result.new_escaped(#{value_expr})" |