Class: ActiveAdmin::Inputs::FilterHabtmInput
- Inherits:
-
FilterSelectInput
- Object
- FilterSelectInput
- ActiveAdmin::Inputs::FilterHabtmInput
- Includes:
- FilterBase
- Defined in:
- lib/active_admin_relationship_filters/filters/filter_habtm_input.rb
Instance Method Summary collapse
- #extra_input_html_options ⇒ Object
- #input_name ⇒ Object
- #input_options ⇒ Object
- #method ⇒ Object
- #to_html ⇒ Object
Methods included from FilterBase
Instance Method Details
#extra_input_html_options ⇒ Object
26 27 28 |
# File 'lib/active_admin_relationship_filters/filters/filter_habtm_input.rb', line 26 def {} end |
#input_name ⇒ Object
13 14 15 16 |
# File 'lib/active_admin_relationship_filters/filters/filter_habtm_input.rb', line 13 def input_name name = super.sub("_ids_eq", "") "#{name}s_id_in" end |
#input_options ⇒ Object
18 19 20 |
# File 'lib/active_admin_relationship_filters/filters/filter_habtm_input.rb', line 18 def super.merge(:include_blank => I18n.t('active_admin.any')) end |
#method ⇒ Object
22 23 24 |
# File 'lib/active_admin_relationship_filters/filters/filter_habtm_input.rb', line 22 def method super.to_s.sub(/_id$/,'').to_sym end |
#to_html ⇒ Object
6 7 8 9 10 11 |
# File 'lib/active_admin_relationship_filters/filters/filter_habtm_input.rb', line 6 def to_html input_wrapping do label_html << ([:group_by] ? grouped_select_html : select_html) end end |