Validation again: Path is not used anymore, so we must not validate on it

TODO: migration to remove it.
This commit is contained in:
Rémi Vanicat 2010-12-22 11:23:53 +01:00
parent d59b3e26fc
commit 1a34c5ee19

View file

@ -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