I’m not really sure what going on here. After nesting the resources like this
resources :users do
resources :bookmarks
end
I expected the url should be /users/[user-id]/bookmarks/[bookmark-id]/edit, but rails renders a reverse path /users/[bookmark-id]/bookmarks/[user-id]/edit
This is the view
<%= link_to 'edit', edit_user_bookmark_path(@bookmark) %>
Any idea how to fix it ? Thanks
What you expect is the rule.
Replace with: