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

TODO: migration to remove it.
master
Rémi Vanicat 2010-12-22 11:23:53 +01:00
parent d59b3e26fc
commit 1a34c5ee19
1 changed files with 2 additions and 1 deletions

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