rails-refresher/app/models/article.rb
Tyrel Souza 8a91d51c39
finish
2024-07-04 21:00:08 -04:00

9 lines
194 B
Ruby

class Article < ApplicationRecord
include Visible
has_many :comments, dependent: :destroy
validates :title, presence: true
validates :body, presence: true, length: { minimum: 10 }
end