diff --git a/lib/acts_as_follower/followable.rb b/lib/acts_as_follower/followable.rb index 7582859..851afc0 100644 --- a/lib/acts_as_follower/followable.rb +++ b/lib/acts_as_follower/followable.rb @@ -59,6 +59,11 @@ def blocked_followers_count self.followings.blocked.count end + # Returns the following scope. + def followers_scoped(options={}) + self.followings.unblocked.includes(:follower) + end + # Returns the following records. def followers(options={}) self.followings.unblocked.includes(:follower).all(options).collect{|f| f.follower}