to know how to implement authentication from scratch in Rails with the help of the has_secure_password class method and the bcrypt 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:
Good work with custom logout route.
Good logic with not allow add friend/sent messages to yourself.
Good work with email unique and validity validation.
Good work with Facebook login.
Excellent routes configuration.
Good use of scope.
Good work with models' relationship definition.
Good use with helper_method, before_action and skip_before_action.
Suggestions
Should validate new message form.
Congrats again on the submission. Your code is very clean, we're impressed. Keep your good work :100: Let us know if you have any feedback.
Hi @kenk11, nice work with the homework :+1:
The goals of this homework are:
has_secure_password
class method and thebcrypt
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:
logout
route.email
unique and validity validation.scope
.helper_method
,before_action
andskip_before_action
.Suggestions
Congrats again on the submission. Your code is very clean, we're impressed. Keep your good work :100: Let us know if you have any feedback.