Sha256: a40719822ad19ec5bb682483f1f4969b41337b676e927d6cf21074ae85fe6058
Contents?: true
Size: 684 Bytes
Versions: 9
Compression:
Stored size: 684 Bytes
Contents
# frozen_string_literal: true module Archangel ## # Field classification custom input for SimpleForm # class FieldClassificationInput < SimpleForm::Inputs::CollectionSelectInput ## # Do not include blank select option # # @return [Boolean] to skip blank select option # def skip_include_blank? true end protected def collection @collection ||= resource_options end def resource_options [].tap do |option| Archangel::Field::CLASSIFICATIONS.each do |classification| option << [Archangel.t("classification.#{classification}"), classification] end end end end end
Version data entries
9 entries across 9 versions & 1 rubygems