Sha256: 08af6c97ad7c4de40fb258b963eabd5400a24f2168698c096fa6cdd07ac6ad50

Contents?: true

Size: 380 Bytes

Versions: 25

Compression:

Stored size: 380 Bytes

Contents

module Coco
  module Concerns
    module ActsAsFieldWithHtmlOptions
      extend ActiveSupport::Concern
      include Concerns::HasName

      def set_html_options!
        @html_options[:data] ||= {}
        @html_options[:data][:coco] = "✔"
        @html_options[:data][:component] = "form-#{component_name.delete_prefix("fields-")}"
        super
      end
    end
  end
end

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
coveragebook_components-0.16.0 app/components/coco/concerns/acts_as_field_with_html_options.rb
coveragebook_components-0.15.0 app/components/coco/concerns/acts_as_field_with_html_options.rb
coveragebook_components-0.14.0 app/components/coco/concerns/acts_as_field_with_html_options.rb
coveragebook_components-0.13.1 app/components/coco/concerns/acts_as_field_with_html_options.rb
coveragebook_components-0.13.0 app/components/coco/concerns/acts_as_field_with_html_options.rb