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) ⇒ 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.
372 373 374 |
# File 'app/helpers/glib/json_ui/view_builder/panels.rb', line 372 def assoc_order_index @assoc_order_index end |
#model_name ⇒ Object (readonly)
See Panels::Form.field_name
371 372 373 |
# File 'app/helpers/glib/json_ui/view_builder/panels.rb', line 371 def model_name @model_name end |
Instance Method Details
#field_assert_respond_to(prop) ⇒ Object
407 408 409 410 |
# File 'app/helpers/glib/json_ui/view_builder/panels.rb', line 407 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
391 392 393 |
# File 'app/helpers/glib/json_ui/view_builder/panels.rb', line 391 def field_label(prop, args) @delegate_class.field_label(@model, @model_name, prop, args) end |
#field_name(prop, multiple) ⇒ Object
383 384 385 |
# File 'app/helpers/glib/json_ui/view_builder/panels.rb', line 383 def field_name(prop, multiple) @delegate_class.field_name(@model, prop, multiple, page) end |
#field_validation(prop) ⇒ Object
403 404 405 |
# File 'app/helpers/glib/json_ui/view_builder/panels.rb', line 403 def field_validation(prop) @delegate_class.field_validation(@model, prop) end |
#field_value(prop) ⇒ Object
387 388 389 |
# File 'app/helpers/glib/json_ui/view_builder/panels.rb', line 387 def field_value(prop) @delegate_class.field_value(@model, prop) end |
#hint_label(prop, args) ⇒ Object
395 396 397 |
# File 'app/helpers/glib/json_ui/view_builder/panels.rb', line 395 def hint_label(prop, args) @delegate_class.hint_label(@model_name, prop, args) end |
#model(model) ⇒ Object
374 375 376 377 |
# File 'app/helpers/glib/json_ui/view_builder/panels.rb', line 374 def model(model) @model = model @model_name = @model.class.model_name.singular end |
#order_index(index) ⇒ Object
379 380 381 |
# File 'app/helpers/glib/json_ui/view_builder/panels.rb', line 379 def order_index(index) @assoc_order_index = index end |
#placeholder_label(prop, args) ⇒ Object
399 400 401 |
# File 'app/helpers/glib/json_ui/view_builder/panels.rb', line 399 def placeholder_label(prop, args) @delegate_class.placeholder_label(@model_name, prop, args) end |