Class: KonoUtils::Object::Cell::Show
- Defined in:
- app/concepts/kono_utils/object/cell/show.rb
Instance Method Summary collapse
-
#displayable_attributes ⇒ Array<KonoUtilsBootstrapView4::EditableField>
Elenco dei campi da visualizzare, altrimenti estrapolati dalla policy.
- #field_description(field) ⇒ Object
- #get_field(field) ⇒ Object
Methods inherited from Base
#_prefixes, #base_class, #concept, #content_for_layout, #content_for_layout?, #destroy_custom_polymorphic_path, #edit_custom_polymorphic_path, #index_custom_polymorphic_path, #kono_user, #legacy_concept, logger, #model_gender, #new_custom_polymorphic_path, #show_custom_polymorphic_path, #title_del, #title_del_g, #title_edit_g, #title_mod, #title_new, #title_new_g, #title_newa, #title_show_g
Methods included from KonoUtilsBootstrapView4::ApplicationIconHelper
Instance Method Details
#displayable_attributes ⇒ Array<KonoUtilsBootstrapView4::EditableField>
Elenco dei campi da visualizzare, altrimenti estrapolati dalla policy
20 21 22 23 24 25 26 |
# File 'app/concepts/kono_utils/object/cell/show.rb', line 20 def displayable_attributes if [:displayable_attributes] KonoUtilsBootstrapView4::EditableField.editable_fields_to_field_array([:displayable_attributes]) else KonoUtilsBootstrapView4::EditableField.editable_fields_to_field_array(policy(model).displayable_attributes) end end |
#field_description(field) ⇒ Object
13 14 15 |
# File 'app/concepts/kono_utils/object/cell/show.rb', line 13 def field_description(field) model.class.han field.name end |
#get_field(field) ⇒ Object
8 9 10 |
# File 'app/concepts/kono_utils/object/cell/show.rb', line 8 def get_field(field) model.send(field.name) end |