From 851c42ebd003f3c8d666ba0367dcb14ab629f19f Mon Sep 17 00:00:00 2001 From: 17sushmita <17sushmita@gmail.com> Date: Sun, 14 Mar 2021 20:27:58 +0530 Subject: [PATCH] Fix part of #8542 Removed banned users from followers/following list --- 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..a8f62d7bc5 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