This is good stuff, here are my notes on your code:
- Good job protecting against spoof posts by manually assigning the
author_id
tocurrent_user.id
and also restricting author_id from yourpost_params
method. 👍 👍 👍 - Good work having
if logged_in?
logic on all of the appropriate views! 👍 - When searching by id number, instead of using
find_by
it is best to usefind
since that method is designed to search on the id field. [Here are the docs onfind
](http://guides.rubyonrails.org/active_record_querying.html#retrieving-a-single-ob