Specs:
-
Using Ruby on Rails for the project
-
Include at least one has_many relationship (Golfer has_many rounds, GolfCourse has_many rounds, GolfCourse has_many tags, Tag has_many golf_courses)
-
Include at least one belongs_to relationship (Round belongs_to Golfer, Round belongs_to GolfCourse, Tag belongs to GolfCourseTag, GolfCourse belongs_to GolfCourseTag)
-
Include at least one has_many through relationship (Golfer has_many GolfCourses through Rounds, GolfCourse has_many Golfers through Rounds)
-
The "through" part of the has_many through includes at least one user submittable attribute (round.score, tag.name)
-
Include reasonable validations for simple model objects (Golfer - devise :database_authenticatable, :validatable, validates_presence_of :name GolfCourse - validates_uniqueness_of :name, validates :holes, numericality: { equal_to: 18 }, validates :total_par, numericality: { greater_than: 62 }, validates :course_rating, numericality: { greater_than: 60 }, validates :course_slope, numericality: { greater_than: 99 } Round - validates_presence_of :score, :golfer_id, :golf_course_id Tag - validates presence and uniqueness of :name)
-
Include a class level ActiveRecord scope method (GolfCourse.highest_course_slope, GolfCourse.lowest_course_slope, Round.low_round_score, Round.low_round_from_par, Round.low_round_net (URL: root). GolfCourse.course_lowest_round, (URL: /golf_courses/:id).)
-
Include a nested form writing to an associated model using a custom attribute writer (form URL: /golfers/:golfer_id/rounds/new for GolfCourse, and golf_courses/new and golf_courses/edit for Tag)
-
Include signup (Devise)
-
Include login (Devise)
-
Include logout (Devise)
-
Include third party signup/login (URL: /golfers/auth/facebook, Controller: omniauth/omniauth_callbacks#facebook AND URL: /golfers/auth/google_oauth2, Controller: omniauth/omniauth_callbacks#google_oauth2)
-
Include nested resource show or index (URL: /golf_courses/:golf_course_id/rounds)
-
Include nested resource "new" form (URL: /golfers/:golfer_id/rounds/new)
-
Include form display of validation errors (form URL: /golf_courses/new)
Confirm:
- The application is pretty DRY
- Limited logic in controllers
- Views use helper methods if appropriate
- Views use partials if appropriate