Commit c3df8189d3f8d00e35d6219101db4d2150c11ded
Committed by
Tom Cocca
1 parent
cf523ca3
Exists in
master
and in
3 other branches
Using the same method for the followers method in there, too. no use for differe…
…nt methods for the same purpose.. and the STI checks makes surely sense. Signed-off-by: Tom Cocca <tom.cocca@gmail.com>
Showing
1 changed file
with
1 additions
and
1 deletions
Show diff stats
lib/acts_as_followable.rb
... | ... | @@ -25,7 +25,7 @@ module ActiveRecord #:nodoc: |
25 | 25 | # Returns the following records. |
26 | 26 | def followers |
27 | 27 | Follow.find(:all, :include => [:follower], :conditions => ["followable_id = ? AND followable_type = ?", |
28 | - self.id, self.class.to_s]).collect {|f| f.follower } | |
28 | + self.id, parent_class_name(self)]).collect {|f| f.follower } | |
29 | 29 | end |
30 | 30 | |
31 | 31 | # Returns true if the current instance is followed by the passed record. | ... | ... |