提交 9ab63547 编写于 作者: C claudiob

Fix docs in collection_radio_buttons

[ci skip] Just some english and `<tt>` tags.
上级 5a302bf5
...@@ -651,12 +651,12 @@ def time_zone_options_for_select(selected = nil, priority_zones = nil, model = : ...@@ -651,12 +651,12 @@ def time_zone_options_for_select(selected = nil, priority_zones = nil, model = :
# The HTML specification says when nothing is select on a collection of radio buttons # The HTML specification says when nothing is select on a collection of radio buttons
# web browsers do not send any value to server. # web browsers do not send any value to server.
# Unfortunately this introduces a gotcha: # Unfortunately this introduces a gotcha:
# if a +User+ model has a +category_id+ field, and in the form none category is selected no +category_id+ parameter is sent. So, # if a +User+ model has a +category_id+ field and in the form no category is selected, no +category_id+ parameter is sent. So,
# any strong parameters idiom like # any strong parameters idiom like:
# #
# params.require(:user).permit(...) # params.require(:user).permit(...)
# #
# will raise an error since no +{user: ...}+ will be present. # will raise an error since no <tt>{user: ...}</tt> will be present.
# #
# To prevent this the helper generates an auxiliary hidden field before # To prevent this the helper generates an auxiliary hidden field before
# every collection of radio buttons. The hidden field has the same name as collection radio button and blank value. # every collection of radio buttons. The hidden field has the same name as collection radio button and blank value.
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册