Module: Coco::Concerns::ActsAsFieldWithOptions
- Extended by:
- ActiveSupport::Concern
- Includes:
- HasName
- Included in:
- Fields::ButtonComponent, Fields::CheckBoxComponent, Fields::ColorFieldComponent, Fields::DateFieldComponent, Fields::DatetimeLocalFieldComponent, Fields::EmailFieldComponent, Fields::ErrorMessageComponent, Fields::FileFieldComponent, Fields::HintComponent, Fields::LabelComponent, Fields::MonthFieldComponent, Fields::NumberFieldComponent, Fields::PasswordFieldComponent, Fields::RadioButtonComponent, Fields::RangeFieldComponent, Fields::SearchFieldComponent, Fields::SubmitComponent, Fields::TelephoneFieldComponent, Fields::TextAreaComponent, Fields::TextFieldComponent, Fields::TimeFieldComponent, Fields::UrlFieldComponent, Fields::WeekFieldComponent
- Defined in:
- app/components/coco/concerns/acts_as_field_with_options.rb
Instance Method Summary collapse
Methods included from HasName
Instance Method Details
#combine_options! ⇒ Object
7 8 9 10 11 12 |
# File 'app/components/coco/concerns/acts_as_field_with_options.rb', line 7 def @options[:data] ||= {} @options[:data][:coco] = "✔" @options[:data][:component] = "form-#{component_name.delete_prefix("fields-")}" super end |