This commit is contained in:
BoHung Chiu 2020-10-31 10:23:14 +08:00
parent 9abe9b71b6
commit c40c552a1d
1 changed files with 1 additions and 1 deletions

View File

@ -276,7 +276,7 @@ class Admin::GalleriesController < OrbitAdminController
@filter_fields.delete(:status)
albums1 = Album.where(:order.in => [nil,-1]).desc(:created_at).with_categories(filters("category")).with_tags(filters("tag"))
albums1 = search_data(albums1,[:name])
albums2 = Album.where(:order.gt => -1).asc(:order).with_categories(filters("category")).with_tags(filters("tag"))
albums2 = Album.all.where(:order.ne=>-1).and(:order.ne=>nil).asc(:order).with_categories(filters("category")).with_tags(filters("tag"))
albums2 = search_data(albums2,[:name])
@fiter_albums = albums1.concat(albums2)
end