app/controllers/admin/pages_controller.rb in spree_cms-0.0.3 vs app/controllers/admin/pages_controller.rb in spree_cms-0.0.4

- old
+ new

@@ -32,13 +32,18 @@ # QUERY - better as named scope or as SL scope? #if params[:search].nil? || params[:search][:deleted_at_not_null].blank? # base_scope = base_scope.not_deleted #end - @search = Page.search(params[:search]) - @search.order ||= "ascend_by_title" + @search = Page.searchlogic(params[:search]) - @collection = @search.paginate(:page => params[:page]) + # @search = Post.search(params[:search]) + # @search.order ||= "ascend_by_title" + + @collection = @search.do_search.paginate( + :per_page => (Spree::Config[:per_page]||50), + :page => params[:page] + ) else @collection = Page.title_contains(params[:q]).all(:include => includes, :limit => 10) @collection.uniq! end