yooo this is sick
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
class Article < ApplicationRecord
|
||||
include Visible
|
||||
|
||||
belongs_to: :user
|
||||
belongs_to :user
|
||||
has_many :comments, dependent: :destroy
|
||||
|
||||
validates :title, presence: true
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
class User < ApplicationRecord
|
||||
has_many :articles, dependent: :destroy
|
||||
|
||||
has_many :articles, dependent: :destroy
|
||||
has_secure_password
|
||||
|
||||
validates :email, presence: true, uniqueness: true
|
||||
validates :password, presence: true, length: { minimum: 6 }
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user