Class: RadioField
- Inherits:
-
BasicField
- Object
- BasicField
- RadioField
- Defined in:
- lib/formalize/field.rb
Instance Attribute Summary collapse
-
#opts ⇒ Object
Returns the value of attribute opts.
Instance Method Summary collapse
-
#initialize(id, opts = {}) ⇒ RadioField
constructor
A new instance of RadioField.
Methods inherited from BasicField
#errors, #errors=, #input, #valid?, #validate, #validate_format, #validate_length, #validate_presence, #value, #value=
Methods included from Helpers
#tag, #tag_attributes, #tag_content
Constructor Details
#initialize(id, opts = {}) ⇒ RadioField
Returns a new instance of RadioField.
109 110 111 112 |
# File 'lib/formalize/field.rb', line 109 def initialize(id, opts={}) super @opts[:type] = :radio end |
Instance Attribute Details
#opts ⇒ Object
Returns the value of attribute opts.
108 109 110 |
# File 'lib/formalize/field.rb', line 108 def opts @opts end |