Conversation
There was a problem hiding this comment.
Since you use this line several times, you can DRY up your code by extracting it into a separate private method and calling that method instead. You can then also set it up as a before action scoped to show, edit, and update. Eg.
before_action: find_book, only: [:show, :edit, :update]
private
def find_book
return Book.find(params[:id])
end|
Really nice job on this project, @annaleeherrera . I like how clean and readable your code is. I left a few comments about consistency in formatting and a few tips for DRYing it up, but in general you're doing a great job at writing easy-to-read code, and it looks like you have a good understanding of Rails routing conventions and form helpers. The decision of whether to put code in Controllers or Models can be subjective, and you'll develop your own feeling for where you like to put various types of logic. Keep up the good work! |
Last thing to do: Hide files in GitIgnore
Completed waves 1-3