instance method
color_field
Ruby on Rails 8.1.2
Since v4.0.13Signature
color_field(object_name, method, options = {})
Returns a text_field of type “color”.
color_field("car", "color") # => <input id="car_color" name="car[color]" type="color" value="#000000" />
Parameters
-
object_namereq -
methodreq -
optionsopt = {}
Source
# File actionview/lib/action_view/helpers/form_helper.rb, line 1377
def color_field(object_name, method, options = {})
Tags::ColorField.new(object_name, method, self, options).render
end
Defined in actionview/lib/action_view/helpers/form_helper.rb line 1377
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActionView::Helpers::FormHelper