Hi @minhhuynguyen91, nice work with your assignment 2 submission :+1:
The goals of this homework are:
to know how to implement authentication from scratch in Rails with the help of the has_secure_password class method and the brypt gem (while understanding what they do under the hood)
to design a more complex schema for a web app and be more familiar with ActiveRecord API such as custom foreign keys for belongs_to/has_many, using has_many :through and building more advanced queries by chaining where, order, and merge
to build more complex forms in views that involve multiple models.
Quick review:
Correctly handle user signup in Users controller and user login in Sessions controller and define current_user correcty
Use validations for improtant columns
Use partial
Correctly define belongs_to/has_many with custom class_name and foreign_id
Hi @minhhuynguyen91, nice work with your assignment 2 submission :+1:
The goals of this homework are:
has_secure_password
class method and thebrypt
gem (while understanding what they do under the hood)belongs_to
/has_many
, usinghas_many :through
and building more advanced queries by chainingwhere
,order
, andmerge
Quick review:
current_user
correctybelongs_to
/has_many
with custom class_name and foreign_idhas_many :through
for friendshipGreat work on implementing all required stories and optional stories.
Detailed review
Gemfile:
Routes file:
resources
method and Clean custom routesControllers:
Congrats again on the submission. Everyone has limited time; it's good to see you .... Let us know if you have any feedback.