From f53b8ae01701bb8a7e0cc7b3a89c63a00c38339e Mon Sep 17 00:00:00 2001 From: Michael Christenson II Date: Tue, 16 Dec 2008 06:01:45 +0800 Subject: [PATCH] The parent_class_name(self) is not coming up as defined - hence no followers. I simplyfied it by using self.class.to_s . --- 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 c893046..6b6dce8 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, parent_class_name(self)]).collect {|f| f.follower } + self.id, self.class.to_s]).collect {|f| f.follower } end # Returns true if the current instance is followed by the passed record. -- libgit2 0.21.0