Closed MaksHostroushko closed 1 year ago
Looks great! Let me show you some places for improvements
https://github.com/alinajuly/RubyHW/blob/main/HW5-6-7/blog/app/models/article.rb#L4 Please, update the name for your join table We should do it readable and understandable I mean, article_tags instead of articletags You can read here https://guides.rubyonrails.org/association_basics.html for a little bit more info
article_tags
articletags
https://github.com/alinajuly/RubyHW/blob/main/HW5-6-7/blog/app/models/comment.rb#L10..L12 I believe, we can use the same validations for multiple columns It this case our code will be more readable validates :article_id, : author_id, :body presence: true
validates :article_id, : author_id, :body presence: true
Thank you, have been updated.
Looks great! Let me show you some places for improvements
https://github.com/alinajuly/RubyHW/blob/main/HW5-6-7/blog/app/models/article.rb#L4 Please, update the name for your join table We should do it readable and understandable I mean,
article_tags
instead ofarticletags
You can read here https://guides.rubyonrails.org/association_basics.html for a little bit more infohttps://github.com/alinajuly/RubyHW/blob/main/HW5-6-7/blog/app/models/comment.rb#L10..L12 I believe, we can use the same validations for multiple columns It this case our code will be more readable
validates :article_id, : author_id, :body presence: true