From 9952970fac4882e75d63733e18e17a9c14c9a0b2 Mon Sep 17 00:00:00 2001 From: Jörg Battermann Date: Fri, 26 Dec 2008 11:11:39 +0800 Subject: [PATCH] followed_by? was woed --- lib/acts_as_followable.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/acts_as_followable.rb b/lib/acts_as_followable.rb index ff103a6..1b837f0 100644 --- a/lib/acts_as_followable.rb +++ b/lib/acts_as_followable.rb @@ -30,7 +30,7 @@ module ActiveRecord #:nodoc: # Returns true if the current instance is followed by the passed record. def followed_by?(follower) - self.follows.find(:first, :conditions => ["follower_id = ? AND follower_type = ?", follower.id, parent_class_name(follower)]) ? true : false + follower.follows.find(:first, :conditions => ["followable_id = ? AND followable_type = ?", self.id, parent_class_name(self)]) ? true : false end # Retrieves the parent class name if using STI. -- libgit2 0.21.0