From 9da7272e5934d31b81d798c036180eccdedbc6ef Mon Sep 17 00:00:00 2001 From: danielvincent Date: Thu, 4 Nov 2010 12:58:24 -0700 Subject: [PATCH] should query the correct collection on perform --- app/models/retraction.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/models/retraction.rb b/app/models/retraction.rb index 8c8479f80..12257a591 100644 --- a/app/models/retraction.rb +++ b/app/models/retraction.rb @@ -30,7 +30,7 @@ class Retraction def perform receiving_user_id Rails.logger.debug "Performing retraction for #{post_id}" - if Post.find_by_id(post_id) + if self.type.constantize.find_by_id(post_id) unless Post.first(:diaspora_handle => person.diaspora_handle, :id => post_id) raise "#{person.inspect} is trying to retract a post they do not own" end