How can I create Twitter-style routes using Rails3?
I tried the following:
match ':username', :controller => "users", :action => "show"
match ':username/:controller(/:action(/:id))', :path_prefix => '/:username'
EDIT
After some extra copying through the docs, I did this and it seems to work:
scope '/:username' do
resources :clubs
end
What is the scope method, and is there an automatic way to generate link_to links in my views?
source
share