map.resources :users do |user|
user.resources :blog, :controller => :user_blog_controller,
:name_prefix => 'user_'
end
The trouble is that I cannot user blog_path() without an argument.
blogs_path() does not work either and it would be ugly/inconsistent if
it did anyway.
Couldn't blog_path with no arguments just return /blog and not try to
return /blog/SOME_ID?
I could just do user.resources :blog_entries, but it doesn't give as
nice URLs. Besides, I have the same problem with user.resources
:mailbox.
My user blog contains the user's blog entries, so IT IS plural in
semantics. It's just that I don't want the URL to be
/user/123/blog_entries but /user/123/blog instead. Unfortunately,
"blog" is singular.
Erik
P.S. Thanks for recommending to read the documentation. I've found the
documentation as such to be a very useful thing indeed.
It looks like your going have to map everything the old fashion way.
You can't use a singular word with a resource like that because
map.resources wants to define singular and plural named routes like
blog_path(id) == /blogs/id and blogs_path == /blogs.