One forgotten error with validation
This commit is contained in:
parent
60f703c4ca
commit
d59b3e26fc
|
@ -5,7 +5,7 @@ class Photo < ActiveRecord::Base
|
||||||
|
|
||||||
mount_uploader :file, FileUploader
|
mount_uploader :file, FileUploader
|
||||||
|
|
||||||
validates :path, :presence => true, :uniqueness => true, :message => "Photo already exsists on disc"
|
validates :path, :presence => true, :uniqueness => true
|
||||||
validates :title, :presence => true
|
validates :title, :presence => true
|
||||||
|
|
||||||
before_validation :set_title
|
before_validation :set_title
|
||||||
|
|
Loading…
Reference in a new issue