diff --git a/lib/administrate_exportable/exporter.rb b/lib/administrate_exportable/exporter.rb index bc15284..5c7865d 100644 --- a/lib/administrate_exportable/exporter.rb +++ b/lib/administrate_exportable/exporter.rb @@ -10,9 +10,7 @@ module Exporter def exportable define_method(:export) do search_term = params[:search].to_s.strip - resources = Administrate::Search.new(scoped_resource, - dashboard, - search_term).run + resources = filter_resources(scoped_resource, search_term: search_term) resources = apply_collection_includes(resources) resources = order.apply(resources)