I have a resource nested in another:
resource :users do
resource :posts
end
The official guide says I should have this url:
/users/:id/posts/:id
To show update edit or delete the posts. But in fact I have:
ruby-1.9.2-p290 > app.users_posts_path(1,2)
=> "/users/posts.1?=2"
What's going wrong?
guideyou are seeing that./users/:id/posts(note the plural on posts) implies all posts for that user but if you want to show/edit/update/delete the post then it's /user/:id/post/:id/users/posts.:id=:id, not/user/:id/post/:idor something other.