[英]Changing ActiveAdmin's select-type filter to not have the “any” option
如何從選擇類型過濾器中刪除“任何”選項? 謝謝!
這是一個禁用所有選擇過濾器的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
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.