Class: KonoUtils::Object::Cell::Forms::Fields::Enum
- Inherits:
-
Collection
- Object
- Trailblazer::Cell
- Base
- Collection
- KonoUtils::Object::Cell::Forms::Fields::Enum
- Includes:
- ApplicationEnumHelper
- Defined in:
- app/concepts/kono_utils/object/cell/forms/fields/enum.rb
Overview
Classe per la gestione del campo Enum, semplicemente estendendo la collection, ed estrapolando automaticamente i valori della select e relative traduzioni
Instance Method Summary collapse
-
#collection ⇒ Hash
Ritorna la rappresentazione da utilizzare per stampare la select dell’enum.
- #show(&block) ⇒ Object
Methods inherited from Collection
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
#collection ⇒ Hash
Ritorna la rappresentazione da utilizzare per stampare la select dell’enum
15 16 17 |
# File 'app/concepts/kono_utils/object/cell/forms/fields/enum.rb', line 15 def collection enum_collection(form.object.class, model.name) end |
#show(&block) ⇒ Object
19 20 21 |
# File 'app/concepts/kono_utils/object/cell/forms/fields/enum.rb', line 19 def show(&block) render "forms/fields/collection" end |