Commit 9952970fac4882e75d63733e18e17a9c14c9a0b2

Authored by Jörg Battermann
Committed by Tom Cocca
1 parent c3df8189

followed_by? was woed

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
... ... @@ -30,7 +30,7 @@ module ActiveRecord #:nodoc:
30 30  
31 31 # Returns true if the current instance is followed by the passed record.
32 32 def followed_by?(follower)
33   - self.follows.find(:first, :conditions => ["follower_id = ? AND follower_type = ?", follower.id, parent_class_name(follower)]) ? true : false
  33 + follower.follows.find(:first, :conditions => ["followable_id = ? AND followable_type = ?", self.id, parent_class_name(self)]) ? true : false
34 34 end
35 35  
36 36 # Retrieves the parent class name if using STI.
... ...