@@ -1257,6 +1257,12 @@ def text_area(object_name, method, options = {})
1257
1257
# Additional options on the input tag can be passed as a hash with +options+. The +checked_value+ defaults to 1
1258
1258
# while the default +unchecked_value+ is set to 0 which is convenient for boolean values.
1259
1259
#
1260
+ # ==== Options
1261
+ #
1262
+ # * Any standard HTML attributes for the tag can be passed in, for example +:class+.
1263
+ # * <tt>:checked</tt> - +true+ or +false+ forces the state of the checkbox to be checked or not.
1264
+ # * <tt>:include_hidden</tt> - If set to false, the auxiliary hidden field described below will not be generated.
1265
+ #
1260
1266
# ==== Gotcha
1261
1267
#
1262
1268
# The HTML specification says unchecked check boxes are not successful, and
@@ -1294,6 +1300,8 @@ def text_area(object_name, method, options = {})
1294
1300
# In that case it is preferable to either use +check_box_tag+ or to use
1295
1301
# hashes instead of arrays.
1296
1302
#
1303
+ # ==== Examples
1304
+ #
1297
1305
# # Let's say that @post.validated? is 1:
1298
1306
# check_box("post", "validated")
1299
1307
# # => <input name="post[validated]" type="hidden" value="0" />
@@ -2334,6 +2342,12 @@ def label(method, text = nil, options = {}, &block)
2334
2342
# Additional options on the input tag can be passed as a hash with +options+. The +checked_value+ defaults to 1
2335
2343
# while the default +unchecked_value+ is set to 0 which is convenient for boolean values.
2336
2344
#
2345
+ # ==== Options
2346
+ #
2347
+ # * Any standard HTML attributes for the tag can be passed in, for example +:class+.
2348
+ # * <tt>:checked</tt> - +true+ or +false+ forces the state of the checkbox to be checked or not.
2349
+ # * <tt>:include_hidden</tt> - If set to false, the auxiliary hidden field described below will not be generated.
2350
+ #
2337
2351
# ==== Gotcha
2338
2352
#
2339
2353
# The HTML specification says unchecked check boxes are not successful, and
@@ -2371,6 +2385,8 @@ def label(method, text = nil, options = {}, &block)
2371
2385
# In that case it is preferable to either use +check_box_tag+ or to use
2372
2386
# hashes instead of arrays.
2373
2387
#
2388
+ # ==== Examples
2389
+ #
2374
2390
# # Let's say that @post.validated? is 1:
2375
2391
# check_box("validated")
2376
2392
# # => <input name="post[validated]" type="hidden" value="0" />
0 commit comments