Class: CaringForm::Field::Dummy
- Inherits:
-
Base
- Object
- Struct
- Base
- CaringForm::Field::Dummy
show all
- Defined in:
- lib/caring_form/field/dummy.rb
Instance Attribute Summary
Attributes inherited from Base
#name
Instance Method Summary
collapse
Methods inherited from Base
#default_label, #initialize, register, #render
Instance Method Details
#apply_to_model(klass) ⇒ Object
12
13
14
|
# File 'lib/caring_form/field/dummy.rb', line 12
def apply_to_model(klass)
klass.send(:attr_accessor, name)
end
|
20
21
22
23
24
25
26
27
|
# File 'lib/caring_form/field/dummy.rb', line 20
def input_properties(form, options = {})
super.tap do |req|
req[:wrapper_html][:class] = "form_add #{req[:wrapper_html][:class]}".strip
req[:wrapper_tag] = 'div'
req[:input_html][:required] = nil
end
end
|
#optional ⇒ Object
16
17
18
|
# File 'lib/caring_form/field/dummy.rb', line 16
def optional
true
end
|
#simple_type ⇒ Object
8
9
10
|
# File 'lib/caring_form/field/dummy.rb', line 8
def simple_type
:string
end
|