include AccountControllerConcern
def index
- @accounts = @account.followers.page(params[:page]).per(FOLLOW_PER_PAGE)
+ @follows = Follow.where(target_account: @account).order(id: :desc).page(params[:page]).per(FOLLOW_PER_PAGE).preload(:account)
end
end
include AccountControllerConcern
def index
- @accounts = @account.following.page(params[:page]).per(FOLLOW_PER_PAGE)
+ @follows = Follow.where(account: @account).order(id: :desc).page(params[:page]).per(FOLLOW_PER_PAGE).preload(:target_account)
end
end
- else
= render partial: 'accounts/grid_card', collection: accounts, as: :account, cached: true
-= paginate accounts
+= paginate follows
= render 'accounts/header', account: @account
-= render 'accounts/follow_grid', accounts: @accounts
+= render 'accounts/follow_grid', follows: @follows, accounts: @follows.map(&:account)
= render 'accounts/header', account: @account
-= render 'accounts/follow_grid', accounts: @accounts
+= render 'accounts/follow_grid', follows: @follows, accounts: @follows.map(&:target_account)