Open tinyduypham opened 8 years ago
:star: Everything looks good with the format of your submission. We'll be providing a detailed review soon!
Good work, and sorry for the slow review! This homework is on authentication, using ActiveRecord::Relation, dealing with model associations, using partials, and the items under Bonus help with upcoming topics we will cover.
I like your minimal style. ;) Good job with getting the requirements of the app correct.
session[:user_id]
all over the place. Use your current_user
helper instead when you can. For example, in messages_controller.rb
, instead of:if !m.read && m.receiver_id == session[:user_id]
you can do
if !m.read && m.receiver == current_user
Also along those lines you can compare objects instead of ids. For example,
relation.to.id == current_user.id
can become
relation.to == current_user
It's just a tiny bit cleaner.
users/index
. Good to think of that!
@coderschoolreview
this is my assignment for week 2, thank for your reviews.