volunteers/app/models/story.rb
2023-01-22 20:29:10 +02:00

13 lines
248 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}
def name
header
end
end