ActiveAdmin.register Payment do actions :index config.batch_actions = false filter :created_at_gteq, as: :date_time_picker controller do def find_collection @search = OpenStruct.new(params[:q] || {}) result = Payment.find(:all, params: { order: params.fetch(:order, 'created_at_desc'), page: params.fetch(:page, 1), per_page: params.fetch(:per_page, 50), q: params[:q] || {} }) #this uses https://github.com/Fivell/activeresource-response, # but can be replaced with other ActiveResource pagination implementation limit = result.http_response['X-Limit-Value'].to_i offset = result.http_response['X-Offset-Value'].to_i total = result.http_response['X-Total-Count'].to_i Kaminari.paginate_array(result, limit: limit, offset: offset, total_count: total) end end end