yooo this is sick

This commit is contained in:
2024-08-08 11:19:44 +02:00
parent ffc09cabc4
commit aa0811e25d
22 changed files with 226 additions and 33 deletions

View File

@@ -1,7 +1,7 @@
class Article < ApplicationRecord
include Visible
belongs_to: :user
belongs_to :user
has_many :comments, dependent: :destroy
validates :title, presence: true

View File

@@ -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