From 44f525adbbe9538248120a547d6b367ae75d4485 Mon Sep 17 00:00:00 2001 From: Coleman Date: Fri, 17 Oct 2008 01:34:06 -0500 Subject: [PATCH] use the right scope --- app/models/photo_flag.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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