Skip to content

Latest commit

 

History

History
26 lines (22 loc) · 2.58 KB

specs.md

File metadata and controls

26 lines (22 loc) · 2.58 KB

Specifications for the Rails Assessment

Specs:

  • Using Ruby on Rails for the project
  • Include at least one has_many relationship: Employee HAS MANY Articles
  • Include at least one belongs_to relationship Article BELONGS TO Employee
  • Include at least two has_many through relationships (x has_many y through z; e.g. Recipe has_many Items through Ingredients): Employee HAS MANY Roles THROUGH Employee Roles, Article HAS MANY Tags THROUGH ArticleTags
  • 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) Employee HAS MANY Roles THROUGH Employee Roles, Roles HAS MANY Employees THROUGH Roles
  • 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) Employee (as reviewer) HAS MANY EditorRevisions. EditorRevisions includes field "content" for review notes
  • Include reasonable validations for simple model objects. Article validates title, content length. EditorRevision validates content. Employee validates username. Role validates role. Tag validates tag
  • 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) Article scopes status_published, drafts, by_status
  • Include signup workspace::employees#create
  • Include login sessions#new as login, session#create as username_pw_login
  • Include logout sessions#destroy as logout
  • Include third party signup/login sessions#new as login, omniauth routes back into sessions#create
  • Include nested resource show or index: resources->tags, workspace::articles->editor_revisions, workspace::emlployees->articles
  • Include nested resource "new" form workspace::articles->editor_revisions
  • Include form display of validation errors (form URL e.g. /recipes/new) app/views/workspace/articles/_form.html.erb, app/views/workspace/employees/_form.html.erb. Other alerts, notices, successes are displayed via flash messages at app/views/layouts/_messages.html.erb

Confirm:

  • The application is pretty DRY
  • Limited logic in controllers
  • Views use helper methods if appropriate workspace/articles_helper.rb, workspace/employees_helper.rb, news_helper.rb, tags_helper.rb
  • Views use partials if appropriate numerous