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.19.8 app/components/coco/concerns/acts_as_field_with_html_options.rb
coveragebook_components-0.19.7 app/components/coco/concerns/acts_as_field_with_html_options.rb
coveragebook_components-0.19.6 app/components/coco/concerns/acts_as_field_with_html_options.rb
coveragebook_components-0.19.5 app/components/coco/concerns/acts_as_field_with_html_options.rb
coveragebook_components-0.19.4 app/components/coco/concerns/acts_as_field_with_html_options.rb
coveragebook_components-0.19.3 app/components/coco/concerns/acts_as_field_with_html_options.rb
coveragebook_components-0.19.2 app/components/coco/concerns/acts_as_field_with_html_options.rb
coveragebook_components-0.19.1 app/components/coco/concerns/acts_as_field_with_html_options.rb
coveragebook_components-0.19.0 app/components/coco/concerns/acts_as_field_with_html_options.rb
coveragebook_components-0.18.8 app/components/coco/concerns/acts_as_field_with_html_options.rb
coveragebook_components-0.18.7 app/components/coco/concerns/acts_as_field_with_html_options.rb
coveragebook_components-0.18.0 app/components/coco/concerns/acts_as_field_with_html_options.rb
coveragebook_components-0.17.7 app/components/coco/concerns/acts_as_field_with_html_options.rb
coveragebook_components-0.17.6 app/components/coco/concerns/acts_as_field_with_html_options.rb
coveragebook_components-0.17.5 app/components/coco/concerns/acts_as_field_with_html_options.rb
coveragebook_components-0.17.4 app/components/coco/concerns/acts_as_field_with_html_options.rb
coveragebook_components-0.17.3 app/components/coco/concerns/acts_as_field_with_html_options.rb
coveragebook_components-0.17.2 app/components/coco/concerns/acts_as_field_with_html_options.rb
coveragebook_components-0.17.1 app/components/coco/concerns/acts_as_field_with_html_options.rb
coveragebook_components-0.17.0 app/components/coco/concerns/acts_as_field_with_html_options.rb