Permalink
Browse files

clarifies a bit more what's the issue with check boxes and arrays of …

…parameters
  • Loading branch information...
1 parent 485cd69 commit e8501a15a84f4c0d894273b0decedf64cce66c76 @fxn fxn committed Mar 17, 2009
Showing with 5 additions and 1 deletion.
  1. +5 −1 actionpack/lib/action_view/helpers/form_helper.rb
@@ -655,7 +655,11 @@ def text_area(object_name, method, options = {})
# <% end %>
#
# because parameter name repetition is precisely what Rails seeks to distinguish
- # the elements of the array.
+ # the elements of the array. For each item with a checked check box you
+ # get an extra ghost item with only that attribute, assigned to "0".
+ #
+ # In that case it is preferable to either use +check_box_tag+ or to use
+ # hashes instead of arrays.
#
# ==== Examples
# # Let's say that @post.validated? is 1:

0 comments on commit e8501a1

Please sign in to comment.