1
如何从选择类型过滤器中删除“任意”选项?谢谢!将ActiveAdmin的选择类型过滤器更改为不具有“任何”选项
如何从选择类型过滤器中删除“任意”选项?谢谢!将ActiveAdmin的选择类型过滤器更改为不具有“任何”选项
这是一个monkeypatch,用于禁用所有选择过滤器。把它贴在initializers/active_admin.rb
。
module ActiveAdmin
module Inputs
class FilterSelectInput < ::Formtastic::Inputs::SelectInput
def input_options
super.merge(:include_blank => false)
end
end
end
end