story editor polish
This commit is contained in:
@ -7,6 +7,9 @@ class Member < ApplicationRecord
|
||||
mount_uploader :picture, PictureUploader
|
||||
has_many :stories
|
||||
|
||||
validates :bio, length: { maximum: 1000 }
|
||||
validates :name , length: { minimum: 3 }
|
||||
|
||||
def admin
|
||||
self.email == "torsten@villataika.fi"
|
||||
end
|
||||
|
@ -3,8 +3,8 @@ class Story < ApplicationRecord
|
||||
|
||||
mount_uploader :picture, PictureUploader
|
||||
|
||||
validates :text, length: { maximum: 1000 }
|
||||
validates :header , length: { minimum: 5 }
|
||||
validates :text, length: { minimum: 5 , maximum: 1000 }
|
||||
validates :header , length: { minimum: 5 , maximum: 400}
|
||||
|
||||
def name
|
||||
header
|
||||
|
Reference in New Issue
Block a user