Class: CaringForm::Field::Metadata
- Inherits:
-
Base
- Object
- Struct
- Base
- CaringForm::Field::Metadata
show all
- Defined in:
- lib/caring_form/field/metadata.rb
Instance Attribute Summary
Attributes inherited from Base
#name
Instance Method Summary
collapse
Methods inherited from Base
#apply_to_model, #default_label, #initialize, register, #render
Instance Method Details
16
17
18
19
20
21
22
23
|
# File 'lib/caring_form/field/metadata.rb', line 16
def input_properties(form, options = {})
req = {:as => :hidden, :input_html => {}, :label_html => {}}
if form.index_on.present?
req[:label_html][:index] = req[:input_html][:index] = form.index_on
end
req[:input_html][:name] = name if ancillary
req.deep_merge!(options)
end
|
#optional ⇒ Object
12
13
14
|
# File 'lib/caring_form/field/metadata.rb', line 12
def optional
true
end
|
#simple_type ⇒ Object
8
9
10
|
# File 'lib/caring_form/field/metadata.rb', line 8
def simple_type
:hidden
end
|