Class: Dima::Html::ArrayField
- Inherits:
-
SimpleField
- Object
- Element
- Field
- SimpleField
- Dima::Html::ArrayField
- Defined in:
- lib/dima/html/field.rb
Instance Attribute Summary collapse
-
#field ⇒ Object
Returns the value of attribute field.
Attributes inherited from SimpleField
#height, #klass, #lambda, #model, #name, #readonly, #width
Attributes inherited from Field
#after, #align, #before, #edit, #form, #has_errors, #hint, #label, #required, #tooltip, #url
Instance Method Summary collapse
Methods inherited from SimpleField
#<<, #>>, #empty?, #main_content_node, #readonly?
Methods inherited from Field
#after_node, #before_node, #edit?, #empty_node, #label_node, #options, #to_n, #url_node, #val, #val=, #validate, #value_node
Methods included from Init
Methods inherited from Element
Instance Attribute Details
#field ⇒ Object
Returns the value of attribute field.
408 409 410 |
# File 'lib/dima/html/field.rb', line 408 def field @field end |
Instance Method Details
#simple_value_node ⇒ Object
410 411 412 413 414 415 416 417 418 419 |
# File 'lib/dima/html/field.rb', line 410 def simple_value_node ary = Node.new(tag: 'div', attributes: { class: 'dim-main-content dim-array' }) self.val.each do |v| self.field << v item = Node.new(tag: 'div', attributes: { class: 'dim-array-item' }) item << self.field.main_content_node ary << item end ary end |