Skip to content

Commit

Permalink
Move logic to not break things
Browse files Browse the repository at this point in the history
  • Loading branch information
ArtOfCode- committed Nov 18, 2021
1 parent c17ed60 commit 19ed348
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/controllers/users_controller.rb
Expand Up @@ -19,7 +19,8 @@ def index
user_scope.search(params[:search])
else
user_scope.order(sort_param => :desc)
end.paginate(page: params[:page], per_page: 48)
end.where.not(deleted: true, community_users: { deleted: true })
.paginate(page: params[:page], per_page: 48) # rubocop:disable Layout/MultilineMethodCallIndentation
@post_counts = Post.where(user_id: @users.pluck(:id).uniq).group(:user_id).count
end

Expand Down Expand Up @@ -488,7 +489,6 @@ def user_scope
else
User.active
end.joins(:community_user).includes(:community_user, :avatar_attachment)
.where.not(deleted: true, community_users: { deleted: true })
end

def check_deleted
Expand Down

0 comments on commit 19ed348

Please sign in to comment.