Skip to content

Commit ecf93d9

Browse files
committed
Fix ::leaderboard to overrride default sort order scope
1 parent d981b3c commit ecf93d9

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

app/models/goal.rb

+1
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@ class Goal < ApplicationRecord
3737
def self.leaderboard
3838
self.all.set_public
3939
.with_up_votes_count
40+
.unscope(:order)
4041
.order(up_votes_count: :desc).limit(10)
4142
end
4243

0 commit comments

Comments
 (0)