Class: EacRailsUtils::CommonFormHelper::FormBuilder::SearchableAssociationField
- Inherits:
-
Object
- Object
- EacRailsUtils::CommonFormHelper::FormBuilder::SearchableAssociationField
- Defined in:
- app/helpers/eac_rails_utils/common_form_helper/form_builder/searchable_association_field.rb
Instance Method Summary collapse
- #hidden_input ⇒ Object
-
#initialize(form_builder, field_name, options) ⇒ SearchableAssociationField
constructor
A new instance of SearchableAssociationField.
- #javascript_tag ⇒ Object
- #visible_input ⇒ Object
Constructor Details
#initialize(form_builder, field_name, options) ⇒ SearchableAssociationField
Returns a new instance of SearchableAssociationField.
7 8 9 10 11 |
# File 'app/helpers/eac_rails_utils/common_form_helper/form_builder/searchable_association_field.rb', line 7 def initialize(form_builder, field_name, ) @form_builder = form_builder @field_name = field_name @options = end |
Instance Method Details
#hidden_input ⇒ Object
13 14 15 |
# File 'app/helpers/eac_rails_utils/common_form_helper/form_builder/searchable_association_field.rb', line 13 def hidden_input @form_builder.form.hidden_field(hidden_input_name, id: hidden_input_id) end |
#javascript_tag ⇒ Object
22 23 24 25 26 |
# File 'app/helpers/eac_rails_utils/common_form_helper/form_builder/searchable_association_field.rb', line 22 def javascript_tag @form_builder.helper.content_tag(:script) do @form_builder.helper.raw("new InputSearchable(#{});") end end |
#visible_input ⇒ Object
17 18 19 20 |
# File 'app/helpers/eac_rails_utils/common_form_helper/form_builder/searchable_association_field.rb', line 17 def visible_input @form_builder.helper.text_field_tag(visible_input_name, '', id: visible_input_id, class: 'form-control') end |