volunteers/app/models/story.rb
2023-02-03 22:34:41 +02:00

14 lines
285 B
Ruby

class Story < ApplicationRecord
belongs_to :member
mount_uploader :picture, PictureUploader
validates :text, length: { minimum: 5 , maximum: 1000 }
validates :header , length: { minimum: 5 , maximum: 400}
validates :picture, presence: true
def name
header
end
end