Skip to content

Commit

Permalink
Include user attribute when fetching scores
Browse files Browse the repository at this point in the history
  • Loading branch information
danielgolf committed Dec 7, 2022
1 parent b1b3a07 commit f0e380c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/controllers/api/scores_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ class ScoresController < ApplicationController
before_action :validate_score_user_id, only: :destroy

def user_feed
scores = Score.all.order(played_at: :desc, id: :desc)
scores = Score.includes(:user).order(played_at: :desc, id: :desc)
serialized_scores = scores.map(&:serialize)

response = {
Expand Down

0 comments on commit f0e380c

Please sign in to comment.