Merge pull request #1410 from Retrospring/feature/load-async-pinned-answers

This commit is contained in:
Karina Kwiatek 2023-10-23 07:54:05 +02:00 committed by GitHub
commit e351990475
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -8,7 +8,7 @@ class UserController < ApplicationController
after_action :mark_notification_as_read, only: %i[show]
def show
@pinned_answers = @user.answers.pinned.includes([{ user: :profile }, :question]).order(pinned_at: :desc).limit(10)
@pinned_answers = @user.answers.pinned.includes([{ user: :profile }, :question]).order(pinned_at: :desc).limit(10).load_async
paginate_answers { |args| @user.cursored_answers(**args) }
respond_to do |format|