residency/app/models/story.rb

13 lines
221 B
Ruby
Raw Normal View History

2023-01-11 17:48:06 +01:00
class Story < ApplicationRecord
2023-01-11 19:52:58 +01:00
belongs_to :member
mount_uploader :picture, PictureUploader
2023-01-12 13:34:26 +01:00
validates :text, length: { maximum: 1000 }
validates :header , length: { minimum: 5 }
2023-01-11 19:52:58 +01:00
def name
header
end
2023-01-11 17:48:06 +01:00
end