I'm doing a job with acts_as_follower gem that users can follow others users. The documentation says:
To get all of the records that an object is following that have not been blocked use the following
user.all_following
# Returns an array of every followed object for the user, this can be a collection of different object types, eg: User, Book
I did that and I'm stiil getting blocked users on loop.
I tried to put a conditional:
<% if current_user.following?(user) %>
But this line also show blocked users, because even with user blocked, it stiil followin user in the follow model.
Currently my call is like this:
<% current_user.all_following.each do |user| %>
Someone knows how I can definitely prevent blocked users from being listed on loop?
Thanks!