must upload pic
This commit is contained in:
parent
1fa5be196c
commit
549ccfad5d
@ -5,5 +5,6 @@ class Picture < ApplicationRecord
|
|||||||
|
|
||||||
validates :text, length: { maximum: 80 }
|
validates :text, length: { maximum: 80 }
|
||||||
validates :happened, presence: true
|
validates :happened, presence: true
|
||||||
|
validates :picture, presence: true
|
||||||
|
|
||||||
end
|
end
|
||||||
|
@ -5,6 +5,7 @@ class Story < ApplicationRecord
|
|||||||
|
|
||||||
validates :text, length: { minimum: 5 , maximum: 1000 }
|
validates :text, length: { minimum: 5 , maximum: 1000 }
|
||||||
validates :header , length: { minimum: 5 , maximum: 400}
|
validates :header , length: { minimum: 5 , maximum: 400}
|
||||||
|
validates :picture, presence: true
|
||||||
|
|
||||||
def name
|
def name
|
||||||
header
|
header
|
||||||
|
Loading…
Reference in New Issue
Block a user