sort fix
This commit is contained in:
parent
a1a8c49a52
commit
d78489209c
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue