Class: KonoUtils::Object::Cell::Show

Inherits:
Base
  • Object
show all
Defined in:
app/concepts/kono_utils/object/cell/show.rb

Instance Method Summary collapse

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

#fa_icon, #icon

Instance Method Details

#displayable_attributesArray<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 options[:displayable_attributes]
    KonoUtilsBootstrapView4::EditableField.editable_fields_to_field_array(options[:displayable_attributes])
  else
    KonoUtilsBootstrapView4::EditableField.editable_fields_to_field_array(policy(model).displayable_attributes)
  end
end

#field_description(field) ⇒ Object

Parameters:



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

Parameters:



8
9
10
# File 'app/concepts/kono_utils/object/cell/show.rb', line 8

def get_field(field)
  model.send(field.name)
end