This commit is contained in:
Harry Bomrah 2016-05-12 19:53:49 +08:00
parent a1a8c49a52
commit d78489209c
1 changed files with 1 additions and 1 deletions

View File

@ -27,7 +27,7 @@ class ArchiveFile
field :rss2_sn
# scope :can_display,where(is_hidden: false)
scope :can_display, ->{where(is_hidden: false).order_by(:is_top=>-1, :sort_number=>1, :title=>1)}
scope :can_display, ->{where(is_hidden: false).order_by([:is_top, :desc],[:sort_number, :asc])}
# belongs_to :archive_file_category