reverse ordering of lookup for browse as an experiment

This commit is contained in:
Kyle Drake 2013-06-23 13:35:39 -07:00
parent ebec39dcea
commit 8153b29537

2
app.rb
View file

@ -20,7 +20,7 @@ end
get '/browse' do
@current_page = params[:current_page] || 1
@current_page = @current_page.to_i
site_dataset = Site.order(:hits.desc, :updated_at.desc).filter(is_banned: false).filter(~{updated_at: nil}).paginate(@current_page, 201)
site_dataset = Site.order(:updated_at.desc, :hits.desc).filter(is_banned: false).filter(~{updated_at: nil}).paginate(@current_page, 201)
@page_count = site_dataset.page_count || 1
@sites = site_dataset.all
slim :browse