Skip to content

Instantly share code, notes, and snippets.

@adamkleingit
Last active January 4, 2016 16:39
Show Gist options
  • Save adamkleingit/8648858 to your computer and use it in GitHub Desktop.
Save adamkleingit/8648858 to your computer and use it in GitHub Desktop.
Lesson 7 homework
  • Project cleanup
    • Remove users new, create, edit, update, destroy actions and relevant links
    • Add link to edit_user_registration_path from the user's email
    • Make sure has_many :cats uses dependent destroy
  • destroy
    • Don't allow destroying the last user in the DB
    • Don't allow destroying female cats
    • Use can_edit? to show / hide destroy link for cat
  • many to many
    • Add validation on like model - user can't like a cat twice
    • Write the helper methods yourself in user model
  • custom actions
    • Implement unlike member action
    • Implement my cats collection action
    • Make sure users can't like their own cats
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment