app/models/follow.rb in acts_as_followable-0.1.8 vs app/models/follow.rb in acts_as_followable-0.1.9
- old
+ new
@@ -2,8 +2,8 @@
belongs_to :followable, :polymorphic => true
belongs_to :follower, :polymorphic => true
scope :for_follower_type, lambda { |follower_type| where("follower_type = ?", follower_type) }
scope :for_followable_type, lambda { |followable_type| where("followable_type = ?", followable_type) }
- scope :for_follower, lambda { |follower| where(["follower_id = ?", follower.id]).for_follower_type(follower.class.name) }
- scope :for_followable, lambda { |followable| where(["followable_id = ?", followable.id]).for_followable_type(followable.class.name) }
+ scope :for_follower, lambda { |follower| where(["follower_id = ?", follower.id]).for_follower_type(ActsAsFollowable::Lib.class_name(follower)) }
+ scope :for_followable, lambda { |followable| where(["followable_id = ?", followable.id]).for_followable_type(ActsAsFollowable::Lib.class_name(followable)) }
end
\ No newline at end of file