Class: Jquard::Schemas::Fields::Select
- Defined in:
- lib/jquard/schemas/fields/select.rb
Constant Summary
Constants inherited from Field
Instance Attribute Summary
Attributes inherited from Field
Instance Method Summary collapse
Methods inherited from Field
#column_span, #column_span_full, #default, #disabled, #disabled?, #helper_text, #initialize, #label, make, #placeholder, #required, #required?
Methods included from ComponentDispatch
Constructor Details
This class inherits a constructor from Jquard::Schemas::Fields::Field
Instance Method Details
#choices ⇒ Object
12 13 14 |
# File 'lib/jquard/schemas/fields/select.rb', line 12 def choices .map { |value, label| [ label, value.to_s ] } end |
#options(map = nil) ⇒ Object
5 6 7 8 9 10 |
# File 'lib/jquard/schemas/fields/select.rb', line 5 def (map = nil) return @options || {} if map.nil? @options = map self end |