Validation again: Path is not used anymore, so we must not validate on it
TODO: migration to remove it.
This commit is contained in:
parent
d59b3e26fc
commit
1a34c5ee19
|
@ -1,11 +1,12 @@
|
|||
class Photo < ActiveRecord::Base
|
||||
# TODO: path not used? it should be removed from the DB
|
||||
|
||||
belongs_to :album
|
||||
has_many :photo_tags, :dependent => :destroy
|
||||
has_many :tags, :through => :photo_tags
|
||||
|
||||
mount_uploader :file, FileUploader
|
||||
|
||||
validates :path, :presence => true, :uniqueness => true
|
||||
validates :title, :presence => true
|
||||
|
||||
before_validation :set_title
|
||||
|
|
Loading…
Reference in a new issue