use the right scope

This commit is contained in:
Coleman 2008-10-17 01:34:06 -05:00
commit 44f525adbb

View file

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