Class: Trestle::Form::Fields::ColorField

Inherits:
FormControl show all
Defined in:
lib/trestle/form/fields/color_field.rb

Instance Attribute Summary

Attributes inherited from Trestle::Form::Field

#block, #builder, #name, #options, #template

Instance Method Summary collapse

Methods inherited from FormControl

#input_group, #input_group_addon, #normalize_options!, #render

Methods inherited from Trestle::Form::Field

#disabled?, #errors, #form_group, #initialize, #normalize_options!, #readonly?, #render

Constructor Details

This class inherits a constructor from Trestle::Form::Field

Instance Method Details

#defaultsObject



6
7
8
# File 'lib/trestle/form/fields/color_field.rb', line 6

def defaults
  super.merge(class: ["form-control-color"])
end

#fieldObject



2
3
4
# File 'lib/trestle/form/fields/color_field.rb', line 2

def field
  builder.raw_color_field(name, options)
end