Skip to content

Commit

Permalink
Use user_submissions_count field instead of user_submissions.size
Browse files Browse the repository at this point in the history
  • Loading branch information
RyanTG committed Nov 13, 2024
1 parent 1bd392f commit e44f015
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions app/models/user.rb
Original file line number Diff line number Diff line change
Expand Up @@ -152,11 +152,11 @@ def list_fave_locations
end

def num_total_submissions
user_submissions.size
user_submissions_count
end

def contributor_rank_int
case user_submissions.size
case user_submissions_count
when 0...50
nil
when 50...250
Expand Down
2 changes: 1 addition & 1 deletion app/views/users/profile.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
%div.darkgrey.stats.font18.bold
%div.stat_num_o
%span.stats
#{@user.user_submissions.size}
#{@user.user_submissions_count}
%span.stats_text Total Contributions
%div.darkgrey.stats.font18.bold
%div.stat_num_o
Expand Down

0 comments on commit e44f015

Please sign in to comment.