README.rdoc in simple_datatables-0.1.9 vs README.rdoc in simple_datatables-0.2.0
- old
+ new
@@ -87,9 +87,13 @@
def search
@products = Product.search(params[:search]).paginate(:page => params[:page], :per_page=>params[:per_page])
respond_with @products
end
+If you are getting strange results (for instance, iTotalRecords and iTotalDisplayRecords both equal 0, or entirely the wrong collection is used), you might want to specify which collection to use:
+
+ respond_with @products, :locals => {:collection => @products}
+
In your search view:
@products.each do |product|
json << [product.name, product.manufacturer.name]
end