app/controllers/spree/admin/uploads_controller.rb in spree_essentials-0.4.0 vs app/controllers/spree/admin/uploads_controller.rb in spree_essentials-0.5.0.rc1
- old
+ new
@@ -5,12 +5,12 @@
end
private
def collection
- params[:search] ||= {}
- params[:search][:meta_sort] ||= "created_at.desc"
- @search = Spree::Upload.metasearch(params[:search])
- @collection = @search.page(params[:page]).per(Spree::Config[:orders_per_page])
+ params[:q] ||= {}
+ params[:q][:sort] ||= "created_at.desc"
+ @search = Spree::Upload.search(params[:q])
+ @collection = @search.result.page(params[:page]).per(Spree::Config[:orders_per_page])
end
end