diff options
author | Star Rauchenberger <fefferburbia@gmail.com> | 2024-12-06 22:59:17 -0500 |
---|---|---|
committer | Star Rauchenberger <fefferburbia@gmail.com> | 2024-12-06 22:59:17 -0500 |
commit | bd5ac0c6a351026c65a5535789edf922eb1ec1bb (patch) | |
tree | 873e43582d8992057c50cd24c18bd2b04937aaf4 /app/controllers | |
parent | 1eef37953908b8695b19cfcd249afa83bb4f8a3a (diff) | |
download | thoughts-bd5ac0c6a351026c65a5535789edf922eb1ec1bb.tar.gz thoughts-bd5ac0c6a351026c65a5535789edf922eb1ec1bb.tar.bz2 thoughts-bd5ac0c6a351026c65a5535789edf922eb1ec1bb.zip |
Make quotes top order deterministic
Diffstat (limited to 'app/controllers')
-rw-r--r-- | app/controllers/quotes_controller.rb | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/app/controllers/quotes_controller.rb b/app/controllers/quotes_controller.rb index 6fa03f2..af1cfcc 100644 --- a/app/controllers/quotes_controller.rb +++ b/app/controllers/quotes_controller.rb | |||
@@ -19,7 +19,7 @@ class QuotesController < ApplicationController | |||
19 | end | 19 | end |
20 | 20 | ||
21 | def top | 21 | def top |
22 | @quotes = Quote.published.order(Arel.sql("(upvotes - downvotes) DESC")).paginate(page: params[:page], per_page: 10) | 22 | @quotes = Quote.published.order(Arel.sql("(upvotes - downvotes) DESC, id ASC")).paginate(page: params[:page], per_page: 10) |
23 | 23 | ||
24 | respond_to do |format| | 24 | respond_to do |format| |
25 | format.html { render :list } | 25 | format.html { render :list } |