Module: Glib::JsonUi::ViewBuilder::Panels::ModelPanel
- Included in:
- Fields::DynamicGroup, Association
- Defined in:
- app/helpers/glib/json_ui/view_builder/panels.rb
Instance Attribute Summary collapse
-
#assoc_order_index ⇒ Object
readonly
Returns the value of attribute assoc_order_index.
-
#model_name ⇒ Object
readonly
See Panels::Form.field_name.
Instance Method Summary collapse
- #field_assert_respond_to(prop) ⇒ Object
- #field_label(prop, args) ⇒ Object
- #field_name(prop, multiple) ⇒ Object
- #field_validation(prop) ⇒ Object
- #field_value(prop, collect_ids: true) ⇒ Object
- #hint_label(prop, args) ⇒ Object
- #model(model) ⇒ Object
- #order_index(index) ⇒ Object
- #placeholder_label(prop, args) ⇒ Object
Instance Attribute Details
#assoc_order_index ⇒ Object (readonly)
Returns the value of attribute assoc_order_index.
465 466 467 |
# File 'app/helpers/glib/json_ui/view_builder/panels.rb', line 465 def assoc_order_index @assoc_order_index end |
#model_name ⇒ Object (readonly)
See Panels::Form.field_name
464 465 466 |
# File 'app/helpers/glib/json_ui/view_builder/panels.rb', line 464 def model_name @model_name end |
Instance Method Details
#field_assert_respond_to(prop) ⇒ Object
500 501 502 503 |
# File 'app/helpers/glib/json_ui/view_builder/panels.rb', line 500 def field_assert_respond_to(prop) raise "Please specify a model for #{self.class.component_name} before using its property" unless @model @delegate_class.field_assert_respond_to(@model, prop) end |
#field_label(prop, args) ⇒ Object
484 485 486 |
# File 'app/helpers/glib/json_ui/view_builder/panels.rb', line 484 def field_label(prop, args) @delegate_class.field_label(@model, @model_name, prop, args) end |
#field_name(prop, multiple) ⇒ Object
476 477 478 |
# File 'app/helpers/glib/json_ui/view_builder/panels.rb', line 476 def field_name(prop, multiple) @delegate_class.field_name(@model, prop, multiple, page) end |
#field_validation(prop) ⇒ Object
496 497 498 |
# File 'app/helpers/glib/json_ui/view_builder/panels.rb', line 496 def field_validation(prop) @delegate_class.field_validation(@model, prop) end |
#field_value(prop, collect_ids: true) ⇒ Object
480 481 482 |
# File 'app/helpers/glib/json_ui/view_builder/panels.rb', line 480 def field_value(prop, collect_ids: true) @delegate_class.field_value(@model, prop, collect_ids: collect_ids) end |
#hint_label(prop, args) ⇒ Object
488 489 490 |
# File 'app/helpers/glib/json_ui/view_builder/panels.rb', line 488 def hint_label(prop, args) @delegate_class.hint_label(@model_name, prop, args) end |
#model(model) ⇒ Object
467 468 469 470 |
# File 'app/helpers/glib/json_ui/view_builder/panels.rb', line 467 def model(model) @model = model @model_name = @model.class.model_name.singular end |
#order_index(index) ⇒ Object
472 473 474 |
# File 'app/helpers/glib/json_ui/view_builder/panels.rb', line 472 def order_index(index) @assoc_order_index = index end |
#placeholder_label(prop, args) ⇒ Object
492 493 494 |
# File 'app/helpers/glib/json_ui/view_builder/panels.rb', line 492 def placeholder_label(prop, args) @delegate_class.placeholder_label(@model_name, prop, args) end |