Class: CaringForm::Field::LookingFor
- Inherits:
-
Collection
- Object
- Struct
- Base
- Collection
- CaringForm::Field::LookingFor
- Defined in:
- lib/caring_form/field/looking_for.rb
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(*args) ⇒ LookingFor
constructor
A new instance of LookingFor.
- #input_properties(form, options = {}) ⇒ Object
Methods inherited from Collection
Methods inherited from Base
#apply_to_model, register, #render, #simple_type
Constructor Details
#initialize(*args) ⇒ LookingFor
Returns a new instance of LookingFor.
8 9 10 11 12 13 |
# File 'lib/caring_form/field/looking_for.rb', line 8 def initialize(*args) super unless self.collection.present? self.collection = end end |
Instance Method Details
#input_properties(form, options = {}) ⇒ Object
15 16 17 18 19 20 |
# File 'lib/caring_form/field/looking_for.rb', line 15 def input_properties(form, = {}) [:prompt] = "-- Choose One --" if .fetch(:prompt, prompt).nil? super.tap do |req| req[:input_html][:title] ||= end end |