add reputation view and improve queries

This commit is contained in:
2021-05-02 00:55:20 +02:00
parent d227cdc87c
commit 1533f539da
9 changed files with 39 additions and 5 deletions

View File

@@ -2,10 +2,10 @@
class WowCharactersController < ProtectedController
def index
@wow_characters = current_user.wow_characters.all
@wow_characters = current_user.wow_characters.includes(:wow_realm, :wow_race, :wow_class, :wow_character_medium)
end
def show
@wow_character = current_user.wow_characters.find(params[:id])
@wow_character = current_user.wow_characters.includes(wow_standings: { wow_reputation: { wow_reputation_tier: :wow_reputation_tier_levels }}).find(params[:id])
end
end