diff --git a/app/models/photo_flag.rb b/app/models/photo_flag.rb index bbfa518..ae96a9d 100644 --- a/app/models/photo_flag.rb +++ b/app/models/photo_flag.rb @@ -1,5 +1,5 @@ class PhotoFlag < ActiveRecord::Base belongs_to :photo, :counter_cache => true belongs_to :user - validates_uniqueness_of :user_id + validates_uniqueness_of :user_id, :scope => :photo_id end