Class: KonoUtils::Object::Cell::Forms::Container

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

Overview

Classe che si occupa di generare il container della form

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

#field_selector_layoutObject



20
21
22
23
# File 'app/concepts/kono_utils/object/cell/forms/container.rb', line 20

def field_selector_layout
  layout = context[:overriden_layout].blank? ? "layout" : context[:overriden_layout]
  layout_ns("cell/forms/field_selectors/#{layout}")
end

#form_attributesObject

Gli attributi da stampare sono un elenco delle options oppure estrapolati tramite la policy



16
17
18
# File 'app/concepts/kono_utils/object/cell/forms/container.rb', line 16

def form_attributes
  options[:form_attributes] || KonoUtilsBootstrapView4::EditableField.editable_fields_to_field_array(policy(model).editable_attributes)
end

#show(&block) ⇒ Object



8
9
10
11
12
# File 'app/concepts/kono_utils/object/cell/forms/container.rb', line 8

def show(&block)
  logger.tagged(dom_id(form.object)) do
    super
  end
end