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.
602 603 604 |
# File 'app/helpers/glib/json_ui/view_builder/panels.rb', line 602 def assoc_order_index @assoc_order_index end |
#model_name ⇒ Object (readonly)
See Panels::Form.field_name
601 602 603 |
# File 'app/helpers/glib/json_ui/view_builder/panels.rb', line 601 def model_name @model_name end |
Instance Method Details
#field_assert_respond_to(prop) ⇒ Object
637 638 639 640 |
# File 'app/helpers/glib/json_ui/view_builder/panels.rb', line 637 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
621 622 623 |
# File 'app/helpers/glib/json_ui/view_builder/panels.rb', line 621 def field_label(prop, args) @delegate_class.field_label(@model, @model_name, prop, args) end |
#field_name(prop, multiple) ⇒ Object
613 614 615 |
# File 'app/helpers/glib/json_ui/view_builder/panels.rb', line 613 def field_name(prop, multiple) @delegate_class.field_name(@model, prop, multiple, page) end |
#field_validation(prop) ⇒ Object
633 634 635 |
# File 'app/helpers/glib/json_ui/view_builder/panels.rb', line 633 def field_validation(prop) @delegate_class.field_validation(@model, prop) end |
#field_value(prop, collect_ids: true) ⇒ Object
617 618 619 |
# File 'app/helpers/glib/json_ui/view_builder/panels.rb', line 617 def field_value(prop, collect_ids: true) @delegate_class.field_value(@model, prop, collect_ids: collect_ids) end |
#hint_label(prop, args) ⇒ Object
625 626 627 |
# File 'app/helpers/glib/json_ui/view_builder/panels.rb', line 625 def hint_label(prop, args) @delegate_class.hint_label(@model_name, prop, args) end |
#model(model) ⇒ Object
604 605 606 607 |
# File 'app/helpers/glib/json_ui/view_builder/panels.rb', line 604 def model(model) @model = model @model_name = @model.class.model_name.singular end |
#order_index(index) ⇒ Object
609 610 611 |
# File 'app/helpers/glib/json_ui/view_builder/panels.rb', line 609 def order_index(index) @assoc_order_index = index end |
#placeholder_label(prop, args) ⇒ Object
629 630 631 |
# File 'app/helpers/glib/json_ui/view_builder/panels.rb', line 629 def placeholder_label(prop, args) @delegate_class.placeholder_label(@model_name, prop, args) end |