From c3df8189d3f8d00e35d6219101db4d2150c11ded Mon Sep 17 00:00:00 2001 From: Jörg Battermann Date: Thu, 25 Dec 2008 12:12:39 +0800 Subject: [PATCH] Using the same method for the followers method in there, too. no use for different methods for the same purpose.. and the STI checks makes surely sense. --- 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 09a95c6..ff103a6 100644 --- a/lib/acts_as_followable.rb +++ b/lib/acts_as_followable.rb @@ -25,7 +25,7 @@ module ActiveRecord #:nodoc: # Returns the following records. def followers Follow.find(:all, :include => [:follower], :conditions => ["followable_id = ? AND followable_type = ?", - self.id, self.class.to_s]).collect {|f| f.follower } + self.id, parent_class_name(self)]).collect {|f| f.follower } end # Returns true if the current instance is followed by the passed record. -- libgit2 0.21.0