Class: Effective::FormInputs::Clear
- Inherits:
-
Effective::FormInput
- Object
- Effective::FormInput
- Effective::FormInputs::Clear
- Defined in:
- app/models/effective/form_inputs/clear.rb
Constant Summary
Constants inherited from Effective::FormInput
Effective::FormInput::BLANK, Effective::FormInput::EXCLUSIVE_CLASS_PREFIXES, Effective::FormInput::EXCLUSIVE_CLASS_SUFFIXES
Instance Attribute Summary
Attributes inherited from Effective::FormInput
Instance Method Summary collapse
Methods inherited from Effective::FormInput
#feedback_options, #hint_options, #initialize, #input_group_options, #input_js_options, #label_options, #wrapper_options
Constructor Details
This class inherits a constructor from Effective::FormInput
Instance Method Details
#icon_name ⇒ Object
15 16 17 18 |
# File 'app/models/effective/form_inputs/clear.rb', line 15 def icon_name return @icon unless @icon.nil? @icon = [:input].delete(:icon) || ''.html_safe end |
#input_html_options ⇒ Object
11 12 13 |
# File 'app/models/effective/form_inputs/clear.rb', line 11 def { class: 'btn btn-primary', type: 'clear' } end |
#to_html(&block) ⇒ Object
5 6 7 8 9 |
# File 'app/models/effective/form_inputs/clear.rb', line 5 def to_html(&block) content_tag(:button, [:input]) do icon_name.present? ? (icon(icon_name) + name) : name end end |