lib/data_table/mongoid.rb in data_table-0.2.4 vs lib/data_table/mongoid.rb in data_table-0.2.5

- old
+ new

@@ -2,9 +2,10 @@ module Mongoid module ClassMethods def _find_objects params, fields, search_fields self.where(_where_conditions params[:sSearch], search_fields). order_by(_order_by_fields params, fields). + limit(_per_page params). paginate :page => _page(params), :per_page => _per_page(params) end def _where_conditions raw_query, search_fields return if (query = raw_query.gsub(/\//, "")).blank?