How to add custom filter to Active Admin?

后端 未结 8 2127
眼角桃花
眼角桃花 2020-12-25 11:04

Active Admin allows me to define filters that are displayed on the index page like so:

ActiveAdmin.register Promo do

  filter :name
  filter :address
  filt         


        
8条回答
  •  南笙
    南笙 (楼主)
    2020-12-25 11:18

    Active admin uses metasearch. For example you can do this:

    filter :"subscription_billing_plan_name" , :as => :select, :collection => BillingPlan.all.map(&:name)
    

提交回复
热议问题