Class: Glib::JsonUi::ViewBuilder::Panels::Association

Inherits:
View show all
Includes:
ModelPanel
Defined in:
app/helpers/glib/json_ui/view_builder/panels.rb

Instance Attribute Summary

Attributes included from ModelPanel

#assoc_order_index, #model_name

Attributes inherited from JsonUiElement

#json, #page

Instance Method Summary collapse

Methods included from ModelPanel

#field_assert_respond_to, #field_label, #field_name, #field_validation, #field_value, #hint_label, #model, #order_index, #placeholder_label

Methods inherited from View

component_name

Methods inherited from JsonUiElement

#initialize, #props

Constructor Details

This class inherits a constructor from Glib::JsonUi::JsonUiElement

Instance Method Details

#childViews(value) ⇒ Object



632
633
634
635
636
637
638
639
# File 'app/helpers/glib/json_ui/view_builder/panels.rb', line 632

def childViews(value)
  @delegate_class = Glib::JsonUi::ViewBuilder::Panels::Form
  form = page.current_form

  form.nested_associations << self
  json.set!(:childViews) { value.call(page.view_builder) }
  form.nested_associations.pop
end