def get_data_for model
      model = apply_search_to(model)

      @data = model.limit(options[:per_page]).offset(start_item).order(options[:order])

      options[:total_count] = model.count
      options[:page_total] = (options[:total_count] / options[:per_page].to_f).ceil
    end
def get_data_for model
      model = apply_search_to(model)

      @data = model.limit(options[:per_page]).offset(start_item).order(options[:order])

      options[:total_count] = model.count
      options[:page_total] = (options[:total_count] / options[:per_page].to_f).ceil
    end
make the model queries to pull back the data based on pagination and search results if given