I want a routes like:
get '/posts/new' => 'posts#new'
get '/:username/posts/:id' => 'posts#show'
get '/:username/posts' => 'posts#index'
Accessible via helpers like:
new_post_path #=> new -
post_path(post) #=> show - :username implied from post
posts_path #=> index - :username implied from session
posts_path(user) #=> index - :username explicit
I'd like to do this with resourceful semantics, instead of specifying each route by hand. Also I'm not sure how to make the url helpers smart.
Thoughs?