use the right scope

master
Coleman 2008-10-17 01:34:06 -05:00
parent 79563cc2a2
commit 44f525adbb
1 changed files with 1 additions and 1 deletions

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