From 235e0d9c641462eb59989cc3d6ba7a2ccca43bdf Mon Sep 17 00:00:00 2001 From: ZENATI YASSINE Date: Wed, 16 Apr 2014 21:15:01 +0200 Subject: [ci skip] Added examples for color_field_tag method --- actionview/lib/action_view/helpers/form_tag_helper.rb | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'actionview/lib/action_view/helpers/form_tag_helper.rb') diff --git a/actionview/lib/action_view/helpers/form_tag_helper.rb b/actionview/lib/action_view/helpers/form_tag_helper.rb index 0bbe08166b..d0ed7ae5eb 100644 --- a/actionview/lib/action_view/helpers/form_tag_helper.rb +++ b/actionview/lib/action_view/helpers/form_tag_helper.rb @@ -550,6 +550,19 @@ module ActionView # # ==== Options # * Accepts the same options as text_field_tag. + # + # ==== Examples + # color_field_tag 'name' + # # => + # + # color_field_tag 'color', '#DEF726' + # # => + # + # color_field_tag 'color', nil, class: 'special_input' + # # => + # + # color_field_tag 'color', '#DEF726', class: 'special_input', disabled: true + # # => def color_field_tag(name, value = nil, options = {}) text_field_tag(name, value, options.stringify_keys.update("type" => "color")) end -- cgit v1.2.3