I think I solved it my self actually!
It turns out that if you name the id parameter something else (like
article_id) Rails actually divides the params correctly.
So this route:
map.article_by_id '*sections/:article_id', :controller =>
"articles", :action => "show", :article_id => /\d|\d-(.+)/
would detect something like this:
news/sports/football/4
and Rails would route to the article controller and show action with
the following params: {"sections"=>["news", "sports", "football"],
"article_id"=>"4"}
Pretty cool, and hopefully this helps someone else with the same
problem that I had.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com
To unsubscribe from this group, send email to 
rubyonrails-talk+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to