From 263afe2154fd06d095126d46c2ff70829025b73c Mon Sep 17 00:00:00 2001 From: raykin Date: Wed, 22 May 2024 15:06:31 +0800 Subject: [PATCH] export compatible with customized search --- lib/administrate_exportable/exporter.rb | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) 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)