Skip to content

Latest commit

 

History

History
24 lines (22 loc) · 2.43 KB

spec.md

File metadata and controls

24 lines (22 loc) · 2.43 KB

Specifications for the Rails Assessment

Specs:

  • Using Ruby on Rails for the project - Using Rails 5.2.5
  • Include at least one has_many relationship (x has_many y; e.g. User has_many Recipes) - User has many comments and has many watchlists
  • Include at least one belongs_to relationship (x belongs_to y; e.g. Post belongs_to User) - Comment belongs to User, Watchlist belongs to User
  • Include at least two has_many through relationships (x has_many y through z; e.g. Recipe has_many Items through Ingredients) - Movie has many comments through User; Movie has many Watchlists through User
  • Include at least one many-to-many relationship (x has_many y through z, y has_many x through z; e.g. Recipe has_many Items through Ingredients, Item has_many Recipes through Ingredients) - Watchlist has many Movies and Movies has many Watchlists through Watchlist_Movies
  • The "through" part of the has_many through includes at least one user submittable attribute, that is to say, some attribute other than its foreign keys that can be submitted by the app's user (attribute_name e.g. ingredients.quantity)
  • Include reasonable validations for simple model objects (list of model objects with validations e.g. User, Recipe, Ingredient, Item) - Model validations included for User and Movie
  • Include a class level ActiveRecord scope method (model object & class method name and URL to see the working feature e.g. User.most_recipes URL: /users/most_recipes) - Scope methods in Movie model for Genre, Recent Releases and Most Commented (which is not implemented in a view but could be)
  • Include signup (how e.g. Devise) - User Controller Method
  • Include login (how e.g. Devise) - Sessions Controller Method
  • Include logout (how e.g. Devise) - Sessions Controller Method
  • Include third party signup/login (how e.g. Devise/OmniAuth) - OmniAuth integration for both Facebook and Google
  • Include nested resource show or index (URL e.g. users/2/recipes) - User Watchlist
  • Include nested resource "new" form (URL e.g. recipes/1/ingredients/new) - User New Watchlist
  • Include form display of validation errors (form URL e.g. /recipes/new) - Create and Edit View for User and Movie models

Confirm:

  • The application is pretty DRY - Use of Partials for forms
  • Limited logic in controllers - Yes
  • Views use helper methods if appropriate - For validation of login/user session
  • Views use partials if appropriate - Yes