only allow pictures for upload

This commit is contained in:
2023-06-18 16:21:41 +03:00
parent def9e6083d
commit 45146e0fbb
3 changed files with 5 additions and 5 deletions

View File

@ -5,5 +5,6 @@ class Picture < ApplicationRecord
validates :text, length: { maximum: 80 }
validates :happened, presence: true
validates :picture, presence: true
end

View File

@ -5,6 +5,7 @@ class Story < ApplicationRecord
validates :text, length: { minimum: 5 , maximum: 1000 }
validates :header , length: { minimum: 5 , maximum: 400}
validates :picture, presence: true
def name
header