From bd5ac0c6a351026c65a5535789edf922eb1ec1bb Mon Sep 17 00:00:00 2001 From: Star Rauchenberger Date: Fri, 6 Dec 2024 22:59:17 -0500 Subject: Make quotes top order deterministic --- app/controllers/quotes_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 end def top - @quotes = Quote.published.order(Arel.sql("(upvotes - downvotes) DESC")).paginate(page: params[:page], per_page: 10) + @quotes = Quote.published.order(Arel.sql("(upvotes - downvotes) DESC, id ASC")).paginate(page: params[:page], per_page: 10) respond_to do |format| format.html { render :list } -- cgit 1.4.1