aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_controller/routing.rb
diff options
context:
space:
mode:
authorRick Olson <technoweenie@gmail.com>2006-04-30 21:06:49 +0000
committerRick Olson <technoweenie@gmail.com>2006-04-30 21:06:49 +0000
commit04ef7f4be6c26e35947f2dd3e4dfbd1eb73c9933 (patch)
tree11ddc1fd8cdba8d1da317ff59465563aa36be6d7 /actionpack/lib/action_controller/routing.rb
parent325cb1269cb2aa8e1abe7bc103db3cb47ae5eaf6 (diff)
downloadrails-04ef7f4be6c26e35947f2dd3e4dfbd1eb73c9933.tar.gz
rails-04ef7f4be6c26e35947f2dd3e4dfbd1eb73c9933.tar.bz2
rails-04ef7f4be6c26e35947f2dd3e4dfbd1eb73c9933.zip
Small fix in routing to allow dynamic routes (broken after [4242]) [Rick]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4319 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/lib/action_controller/routing.rb')
-rw-r--r--actionpack/lib/action_controller/routing.rb4
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})"