diff --git a/app/models/photo.rb b/app/models/photo.rb index 5895cdf..71fc0b6 100644 --- a/app/models/photo.rb +++ b/app/models/photo.rb @@ -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