module ActiveAdmin::Inputs::FilterBase
Public Instance Methods
collection_from_options()
click to toggle source
Override the standard finder to accept a proc
Calls superclass method
# File lib/active_admin/inputs/filter_base.rb, line 30 def collection_from_options if options[:collection].is_a?(Proc) template.instance_exec(&options[:collection]) else super end end
input_wrapping(&block)
click to toggle source
# File lib/active_admin/inputs/filter_base.rb, line 10 def input_wrapping(&block) template.content_tag :div, template.capture(&block), wrapper_html_options end
label_from_options()
click to toggle source
Can pass proc to filter label option
Calls superclass method
# File lib/active_admin/inputs/filter_base.rb, line 19 def label_from_options res = super res = res.call if res.is_a? Proc res end
required?()
click to toggle source
# File lib/active_admin/inputs/filter_base.rb, line 14 def required? false end
wrapper_html_options()
click to toggle source
# File lib/active_admin/inputs/filter_base.rb, line 25 def wrapper_html_options { class: "filter_form_field #{as}" } end