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