Method: Tolaria::FormBuildable#swatch_field
- Defined in:
- lib/tolaria/form_buildable.rb
#swatch_field(method, options = {}) ⇒ Object
Returns a text field that expects to be given a 3 or 6-digit
hexadecimal color value. A preview block near the field
demonstrates the provided color to the user.
Options are forwarded to text_field
.
132 133 134 135 136 137 138 |
# File 'lib/tolaria/form_buildable.rb', line 132 def swatch_field(method, = {}) render(partial:"admin/shared/forms/swatch_field", locals: { f: self, method: method, options: , }) end |