1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

fix document for radio_button

add `# Let's say that @user.receive_newsletter returns "no":` for `def radio_button(object_name, method, tag_value, options = {})`.
fix `# Let's say that @user.category returns "no":` to `# Let's say that @user.receive_newsletter returns "no":`
This commit is contained in:
shingo-nakanishi 2016-09-01 17:31:07 +09:00 committed by GitHub
parent dd65843a0a
commit d089fe2810

View file

@ -965,6 +965,7 @@ module ActionView
# # => <input type="radio" id="post_category_rails" name="post[category]" value="rails" checked="checked" /> # # => <input type="radio" id="post_category_rails" name="post[category]" value="rails" checked="checked" />
# # <input type="radio" id="post_category_java" name="post[category]" value="java" /> # # <input type="radio" id="post_category_java" name="post[category]" value="java" />
# #
# # Let's say that @user.receive_newsletter returns "no":
# radio_button("user", "receive_newsletter", "yes") # radio_button("user", "receive_newsletter", "yes")
# radio_button("user", "receive_newsletter", "no") # radio_button("user", "receive_newsletter", "no")
# # => <input type="radio" id="user_receive_newsletter_yes" name="user[receive_newsletter]" value="yes" /> # # => <input type="radio" id="user_receive_newsletter_yes" name="user[receive_newsletter]" value="yes" />
@ -1711,7 +1712,7 @@ module ActionView
# # => <input type="radio" id="post_category_rails" name="post[category]" value="rails" checked="checked" /> # # => <input type="radio" id="post_category_rails" name="post[category]" value="rails" checked="checked" />
# # <input type="radio" id="post_category_java" name="post[category]" value="java" /> # # <input type="radio" id="post_category_java" name="post[category]" value="java" />
# #
# # Let's say that @user.category returns "no": # # Let's say that @user.receive_newsletter returns "no":
# radio_button("receive_newsletter", "yes") # radio_button("receive_newsletter", "yes")
# radio_button("receive_newsletter", "no") # radio_button("receive_newsletter", "no")
# # => <input type="radio" id="user_receive_newsletter_yes" name="user[receive_newsletter]" value="yes" /> # # => <input type="radio" id="user_receive_newsletter_yes" name="user[receive_newsletter]" value="yes" />