I'm still new to Rails and I have a question about routes.
Right now, I have resources from a post table as normal.
post_path GET /posts/:id(.:format) posts#show
PATCH /posts/:id(.:format) posts#update
PUT /posts/:id(.:format) posts#update
DELETE /posts/:id(.:format) posts#destroy
Is there anyway when I hit the show page, instead of the address bar saying:
http://localhost:3000/posts/3
can I have it say:
http://localhost:3000/posts/restaurantName ?
:restname is a column in Users with a restaurant name.
I'm building a web app for restaurant workers and I'd like it to have the address end with the restauranteur's restaurant name, specifically Post.user.restname.
Thanks for the help