Skip to content

Commit

Permalink
Simplifies Followable#followed_by?.
Browse files Browse the repository at this point in the history
  • Loading branch information
james2m committed Sep 21, 2011
1 parent a484a09 commit 38fc02b
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions lib/acts_as_follower/followable.rb
Original file line number Diff line number Diff line change
Expand Up @@ -70,8 +70,7 @@ def blocks(options={})
# Returns true if the current instance is followed by the passed record
# Returns false if the current instance is blocked by the passed record or no follow is found
def followed_by?(follower)
f = get_follow_for(follower)
(f && !f.blocked?) ? true : false
self.followings.unblocked.for_follower(follower).exists?
end

def block(follower)
Expand Down

0 comments on commit 38fc02b

Please sign in to comment.