2023-01-11 18:48:06 +02:00
|
|
|
class Story < ApplicationRecord
|
2023-01-11 20:52:58 +02:00
|
|
|
belongs_to :member
|
|
|
|
|
|
|
|
mount_uploader :picture, PictureUploader
|
|
|
|
|
2023-01-22 20:29:10 +02:00
|
|
|
validates :text, length: { minimum: 5 , maximum: 1000 }
|
|
|
|
validates :header , length: { minimum: 5 , maximum: 400}
|
2023-06-18 16:21:41 +03:00
|
|
|
validates :picture, presence: true
|
2023-01-12 14:34:26 +02:00
|
|
|
|
2023-01-11 20:52:58 +02:00
|
|
|
def name
|
|
|
|
header
|
|
|
|
end
|
2023-01-11 18:48:06 +02:00
|
|
|
end
|