Sha256: e57dfff6f3a36f1702e23c1e98d03e810f1eb5c39df8f468f7ec15bb0c4781de

Contents?: true

Size: 566 Bytes

Versions: 3

Compression:

Stored size: 566 Bytes

Contents

module KonoUtils::Object::Cell::Forms::Fields # namespace
  #
  # Classe per la gestione del campo Enum, semplicemente estendendo la collection, ed estrapolando automaticamente
  # i valori della select e relative traduzioni
  class Enum < Collection
    include KonoUtils::ApplicationEnumHelper

    ##
    # Ritorna la rappresentazione da utilizzare per stampare la select dell'enum
    # @return [Hash]
    def collection
      enum_collection(form.object.class, model.name)
    end

    def show(&block)
      render "forms/fields/collection"
    end

  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
kono_utils_bootstrap_view4-0.1.0.pre.rc.3 app/concepts/kono_utils/object/cell/forms/fields/enum.rb
kono_utils_bootstrap_view4-0.1.0.pre.rc.2 app/concepts/kono_utils/object/cell/forms/fields/enum.rb
kono_utils_bootstrap_view4-0.1.0.pre.rc.1 app/concepts/kono_utils/object/cell/forms/fields/enum.rb