diff options
Diffstat (limited to 'app/controllers/quotes_controller.rb')
-rw-r--r-- | app/controllers/quotes_controller.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/app/controllers/quotes_controller.rb b/app/controllers/quotes_controller.rb index af1cfcc..d4800cb 100644 --- a/app/controllers/quotes_controller.rb +++ b/app/controllers/quotes_controller.rb | |||
@@ -19,7 +19,9 @@ 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, id ASC")).paginate(page: params[:page], per_page: 10) | 22 | @quotes = Quote.published |
23 | @quotes = @quotes.where("created_at > ?", Time.new(2015,1,1)) if params[:modern] | ||
24 | @quotes = @quotes.order(Arel.sql("(upvotes - downvotes) DESC, id ASC")).paginate(page: params[:page], per_page: 10) | ||
23 | 25 | ||
24 | respond_to do |format| | 26 | respond_to do |format| |
25 | format.html { render :list } | 27 | format.html { render :list } |