Class: YesNoInput
- Inherits:
-
EnumRadioInput
- Object
- SimpleForm::Inputs::CollectionRadioButtonsInput
- EnumRadioInput
- YesNoInput
- Defined in:
- app/inputs/yes_no_input.rb
Overview
SimpleForm input wrapper: yes no.
Instance Method Summary collapse
Methods inherited from EnumRadioInput
Constructor Details
This class inherits a constructor from EnumRadioInput
Instance Method Details
#blank_text ⇒ Object
10 11 12 |
# File 'app/inputs/yes_no_input.rb', line 10 def blank_text [:include_blank].presence || 'Any' end |
#collection ⇒ Object
4 5 6 7 8 |
# File 'app/inputs/yes_no_input.rb', line 4 def collection ar = [['Yes', true], ['No', false]] ar << [blank_text, ''] unless [:include_blank] == false ar end |