al13ntown/app/models/post.rb
2026-08-24 20:12:41 +00:00

13 lines
379 B
Ruby

class Post < ApplicationRecord
belongs_to :blog
has_one_attached :icon_image
#has_many :comments
has_rich_text :body
has_rich_text :mood
has_rich_text :music
validates :title, presence: true,
length: { minimum: 2 }
validates :body, presence: true,
length: { minimum: 5 }
# validates :icon_image, presence:true
end