Module: Coco::Concerns::ActsAsFieldWithHtmlOptions

Instance Method Summary collapse

Methods included from HasName

#component_name

Instance Method Details

#set_html_options!Object



7
8
9
10
11
12
# File 'app/components/coco/concerns/acts_as_field_with_html_options.rb', line 7

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