diff --git a/app/controllers/concerns/party_querying_concern.rb b/app/controllers/concerns/party_querying_concern.rb index d508384..d8ff479 100644 --- a/app/controllers/concerns/party_querying_concern.rb +++ b/app/controllers/concerns/party_querying_concern.rb @@ -9,7 +9,7 @@ module PartyQueryingConcern Party.includes( { raid: :group }, :job, - :user, + { user: { active_crew_membership: :crew } }, :skill0, :skill1, :skill2, @@ -18,7 +18,7 @@ module PartyQueryingConcern :guidebook2, :guidebook3, { characters: :character }, - { weapons: :weapon }, + { weapons: { weapon: :weapon_series } }, { summons: :summon } ) end diff --git a/app/models/party.rb b/app/models/party.rb index 27ae673..0ad7a2a 100644 --- a/app/models/party.rb +++ b/app/models/party.rb @@ -265,7 +265,7 @@ class Party < ApplicationRecord return false unless user Rails.cache.fetch("party_#{id}_favorited_by_#{user.id}", expires_in: 1.hour) do - user.favorite_parties.include?(self) + Favorite.exists?(user_id: user.id, party_id: id) end end