From ff3c5976da42e4ed02659bed09bbf1a611c0dd45 Mon Sep 17 00:00:00 2001 From: harunkumars Date: Fri, 27 Jan 2023 11:51:04 +0530 Subject: [PATCH] add a select filter on an enum attribute in app template for visual testing --- spec/support/templates/admin/stores.rb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/spec/support/templates/admin/stores.rb b/spec/support/templates/admin/stores.rb index 51db584a899e..f9a8750d8424 100644 --- a/spec/support/templates/admin/stores.rb +++ b/spec/support/templates/admin/stores.rb @@ -2,5 +2,9 @@ ActiveAdmin.register Store do permit_params :name, :review_status, :reject_reason + preserve_default_filters! + filter :review_status, as: :select, collection: config.resource_class.review_statuses, multiple: true + filter :reject_reason, as: :select, collection: config.resource_class.reject_reasons + index pagination_total: false end