Skip to content

Commit

Permalink
Merge branch 'hotfix/improve-feed-scores'
Browse files Browse the repository at this point in the history
  • Loading branch information
SergiuApostuTOL committed Aug 29, 2022
2 parents b1b3a07 + ac74781 commit 45445ad
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,5 @@
/config/database.yml
.DS_Store
/storage/*

.idea/
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.all.order(played_at: :desc, id: :desc).includes(:user)
serialized_scores = scores.map(&:serialize)

response = {
Expand Down
12 changes: 6 additions & 6 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -69,12 +69,12 @@
# Many RSpec users commonly either run the entire suite or an individual
# file, and it's useful to allow more verbose output when running an
# individual spec file.
if config.files_to_run.one?
# Use the documentation formatter for detailed output,
# unless a formatter has already been configured
# (e.g. via a command-line flag).
# config.default_formatter = "doc"
end
# if config.files_to_run.one?
# Use the documentation formatter for detailed output,
# unless a formatter has already been configured
# (e.g. via a command-line flag).
# config.default_formatter = "doc"
# end

# Print the 10 slowest examples and example groups at the
# end of the spec run, to help surface which specs are running
Expand Down

0 comments on commit 45445ad

Please sign in to comment.