diff --git a/app/controllers/e_papers_controller.rb b/app/controllers/e_papers_controller.rb index db8767a..0f2a7a3 100644 --- a/app/controllers/e_papers_controller.rb +++ b/app/controllers/e_papers_controller.rb @@ -93,7 +93,7 @@ class EPapersController < ApplicationController def widget tags = OrbitHelper.widget_tags - papers = Paper.filter_by_widget_categories.filter_by_tags(tags).collect do |paper| + papers = Paper.filter_by_widget_categories.filter_by_tags(tags).collect.desc(:period) do |paper| paper_thumb = !paper.image.nil? && !paper.image.url.nil? ? paper.image.thumb.url : "http://www.placehold.it/400x400/EFEFEF/AAAAAA" { "title" => paper.title, diff --git a/app/views/admin/e_papers/_index.html.erb b/app/views/admin/e_papers/_index.html.erb index 246b145..fc92509 100644 --- a/app/views/admin/e_papers/_index.html.erb +++ b/app/views/admin/e_papers/_index.html.erb @@ -46,6 +46,7 @@