Skip to content

Commit

Permalink
add a select filter on an enum attribute in app template for visual t…
Browse files Browse the repository at this point in the history
…esting
  • Loading branch information
harunkumars authored and javierjulio committed Mar 19, 2023
1 parent 245a14a commit ff3c597
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions spec/support/templates/admin/stores.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit ff3c597

Please sign in to comment.