diff --git a/app/controllers/web/admin/career_member_users_controller.rb b/app/controllers/web/admin/career_member_users_controller.rb index 90618dd0..dd6bdf15 100644 --- a/app/controllers/web/admin/career_member_users_controller.rb +++ b/app/controllers/web/admin/career_member_users_controller.rb @@ -3,8 +3,7 @@ class Web::Admin::CareerMemberUsersController < Web::Admin::ApplicationController before_action only: %i[index archived finished lost] do query = { s: 'created_at desc' }.merge(params.permit![:q] || {}) - @q = Career::Member.includes(:career_step_members) - .joins(:user, :career) + @q = Career::Member.joins(:user, :career) .merge(User.permitted) .merge(Career.with_locale) .ransack(query) @@ -31,7 +30,7 @@ def index end def archived - scope = @career_members.includes(:versions).archived + scope = @career_members.archived respond_to do |format| format.html do diff --git a/app/controllers/web/application_controller.rb b/app/controllers/web/application_controller.rb index 796ad921..cb139677 100644 --- a/app/controllers/web/application_controller.rb +++ b/app/controllers/web/application_controller.rb @@ -25,7 +25,11 @@ class Web::ApplicationController < ApplicationController # end def last_answers - @last_answers ||= Resume::Answer.web.order(id: :desc).limit(10) + @last_answers ||= Resume::Answer + .includes(%i[resume user]) + .web + .order(id: :desc) + .limit(10) end # NOTE: https://github.com/charlotte-ruby/impressionist/pull/294 diff --git a/app/controllers/web/vacancy_filters_controller.rb b/app/controllers/web/vacancy_filters_controller.rb index b59fa417..fbe09a2f 100644 --- a/app/controllers/web/vacancy_filters_controller.rb +++ b/app/controllers/web/vacancy_filters_controller.rb @@ -4,7 +4,11 @@ class Web::VacancyFiltersController < Web::ApplicationController def show @options = fetch_options(params[:id]) - scope = Vacancy.web.includes(:technologies).page(params[:page]).order(published_at: :desc) + scope = Vacancy + .web + .includes(%i[technologies taggings]) + .page(params[:page]) + .order(published_at: :desc) options_for_header = { position_level: '',