Users can update and delete their own posts (M)
Closed this issue · 0 comments
JL-J commented
Description
Pre-requisites
Blocked until https://trello.com/c/ceZ4TLlq/10-users-can-sign-up is complete. You can move to "To do" when that's done.
Importance: High
Acceptance Criteria
A non-signed-in user will be redirected to the index page.
A signed-in user can:
update their own posts for a maximum of 10 mins after they're created.
see a helpful error message if they try to update another user's post
delete their own posts.
see a helpful error message if they try to delete another user's post
Requirements
- Run a database migration to associate a user to many posts
- investigate if any current data in any of the prod/dev databases would cause problems if tables were updated.
- Add new routes and controller actions
- https://guides.rubyonrails.org/routing.html#nested-resources