diff --git a/app/controllers/admin/galleries_controller.rb b/app/controllers/admin/galleries_controller.rb index f6a491d..8ae2d8f 100644 --- a/app/controllers/admin/galleries_controller.rb +++ b/app/controllers/admin/galleries_controller.rb @@ -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