Hello
Given the following rules
MyApp::Application.routes.draw do |map|
resources :accounts do
resources :comments
end
match '*path' => redirect("/accounts/%{path}")
end
Can we get ActionDispatch to, rather than redirect, re-run the routes?
This would come in handy for using account handles, as in
http://mymusicwebsite.com/metallica
http://mymusicwebsite.com/metallica/comments
http://mymusicwebsite.com/metallica/comments/2
rather than
http://mymusicwebsite.com/accounts/metallica
http://mymusicwebsite.com/accounts/metallica/comments
http://mymusicwebsite.com/accounts/metallica/comments/2
Any help appreciated.
--
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 [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.