From 320d436141e197e1c254563f77feff00610d15cf Mon Sep 17 00:00:00 2001 From: ZENATI YASSINE Date: Sat, 19 Apr 2014 18:09:07 +0200 Subject: [ci skip] Added example for date_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 47d4c04b09..3104d424dc 100644 --- a/actionview/lib/action_view/helpers/form_tag_helper.rb +++ b/actionview/lib/action_view/helpers/form_tag_helper.rb @@ -614,6 +614,19 @@ module ActionView # # ==== Options # * Accepts the same options as text_field_tag. + # + # ==== Examples + # date_field_tag 'name' + # # => + # + # date_field_tag 'date', '01/01/2014' + # # => + # + # date_field_tag 'date', nil, class: 'special_input' + # # => + # + # date_field_tag 'date', '01/01/2014', class: 'special_input', disabled: true + # # => def date_field_tag(name, value = nil, options = {}) text_field_tag(name, value, options.stringify_keys.update("type" => "date")) end -- cgit v1.2.3