From 45f7b408611a89a735bbb88cb0d27b109d765a90 Mon Sep 17 00:00:00 2001 From: Sushmita <17sushmita@gmail.com> Date: Tue, 16 Mar 2021 14:16:14 +0530 Subject: [PATCH] Fix part of #8542 Removed banned users from followers/following list (#9300) * Fix part of #8542 Removed banned users from followers/following list * fixed codeclimate issue on the previous commit --- app/controllers/users_controller.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb index dc930bf790..31388cbbe6 100644 --- a/app/controllers/users_controller.rb +++ b/app/controllers/users_controller.rb @@ -325,13 +325,13 @@ def followed def following @title = "Following" - @pagy, @users = pagy(@user.following_users, items: 10) + @pagy, @users = pagy(@user.following_users.where(status: 1), items: 10) render 'show_follow' end def followers @title = "Followers" - @pagy, @users = pagy(@user.followers, items: 10) + @pagy, @users = pagy(@user.followers.where(status: 1), items: 10) render 'show_follow' end