Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
adnjoo committed Nov 2, 2024
1 parent f0e9201 commit f849d89
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions app/models/user.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,12 @@ def subscribed?

def self.leaderboard(limit = 10)
self.left_joins(:notes)
.group(:id)
.order("COUNT(notes.id) DESC")
.select("users.id, users.username, COUNT(notes.id) AS score")
.where("notes.archived = true AND notes.completed = true")
.where(public: true)
.limit(limit)
.group(:id)
.order("COUNT(notes.id) DESC")
.select("users.id, users.username, COUNT(notes.id) AS score")
.where("notes.archived = true AND notes.completed = true")
.where(public: true)
.limit(limit)
end

def display_profile_picture
Expand Down

0 comments on commit f849d89

Please sign in to comment.