Skip to content

Commit

Permalink
Minor subscores display fix
Browse files Browse the repository at this point in the history
  • Loading branch information
afleishaker authored Sep 9, 2020
1 parent 8b51b6d commit 70815ab
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/helpers/users_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ def map_user_scores(user)
def map_user_subscores(user)
map = user.subscores.pluck(:name).uniq.map do |name|
{name: name.capitalize,
data: Subscore.where(name: name).order(:created_at).map { |score| [Date.new(score.created_at.year, score.created_at.month, score.created_at.day).to_s, score[:score].round()] }
data: user.subscores.where(name: name).order(:created_at).map { |score| [Date.new(score.created_at.year, score.created_at.month, score.created_at.day).to_s, score[:score].round()] }
}
end
return map
Expand Down

0 comments on commit 70815ab

Please sign in to comment.