Class: ActiveAdmin::Inputs::FilterStringInput

Inherits:
Formtastic::Inputs::StringInput
  • Object
show all
Includes:
FilterBase
Defined in:
lib/active_admin/inputs/filter_string_input.rb

Instance Method Summary collapse

Methods included from FilterBase

#collection_from_options, #humanized_method_name, #input_wrapping, #reflection_for, #required?, #wrapper_html_options

Instance Method Details

#input_nameObject



17
18
19
# File 'lib/active_admin/inputs/filter_string_input.rb', line 17

def input_name
  "#{super}_contains"
end

#label_textObject



13
14
15
# File 'lib/active_admin/inputs/filter_string_input.rb', line 13

def label_text
  I18n.t('active_admin.search_field', :field => super)
end

#to_htmlObject



6
7
8
9
10
11
# File 'lib/active_admin/inputs/filter_string_input.rb', line 6

def to_html
  input_wrapping do
    label_html <<
    builder.text_field(input_name, input_html_options)
  end
end