mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Fix docs #2136 [coffee2code]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2165 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
This commit is contained in:
parent
e54b4d3b54
commit
7dbf051e54
1 changed files with 5 additions and 5 deletions
|
@ -35,7 +35,7 @@ module ActionView
|
||||||
# size="20" maxsize="20" value="<%= @person.password %>" />
|
# size="20" maxsize="20" value="<%= @person.password %>" />
|
||||||
#
|
#
|
||||||
# Single?:
|
# Single?:
|
||||||
# <input type="checkbox" id="person_single" name="person[single] value="1" />
|
# <input type="checkbox" id="person_single" name="person[single]" value="1" />
|
||||||
#
|
#
|
||||||
# Description:
|
# Description:
|
||||||
# <textarea cols="20" rows="40" id="person_description" name="person[description]">
|
# <textarea cols="20" rows="40" id="person_description" name="person[description]">
|
||||||
|
@ -113,12 +113,12 @@ module ActionView
|
||||||
#
|
#
|
||||||
# Example (call, result). Imagine that @post.validated? returns 1:
|
# Example (call, result). Imagine that @post.validated? returns 1:
|
||||||
# check_box("post", "validated")
|
# check_box("post", "validated")
|
||||||
# <input type="checkbox" id="post_validate" name="post[validated] value="1" checked="checked" />
|
# <input type="checkbox" id="post_validate" name="post[validated]" value="1" checked="checked" />
|
||||||
# <input name="post[validated]" type="hidden" value="0" />
|
# <input name="post[validated]" type="hidden" value="0" />
|
||||||
#
|
#
|
||||||
# Example (call, result). Imagine that @puppy.gooddog returns no:
|
# Example (call, result). Imagine that @puppy.gooddog returns no:
|
||||||
# check_box("puppy", "gooddog", {}, "yes", "no")
|
# check_box("puppy", "gooddog", {}, "yes", "no")
|
||||||
# <input type="checkbox" id="puppy_gooddog" name="puppy[gooddog] value="yes" />
|
# <input type="checkbox" id="puppy_gooddog" name="puppy[gooddog]" value="yes" />
|
||||||
# <input name="puppy[gooddog]" type="hidden" value="no" />
|
# <input name="puppy[gooddog]" type="hidden" value="no" />
|
||||||
def check_box(object, method, options = {}, checked_value = "1", unchecked_value = "0")
|
def check_box(object, method, options = {}, checked_value = "1", unchecked_value = "0")
|
||||||
InstanceTag.new(object, method, self).to_check_box_tag(options, checked_value, unchecked_value)
|
InstanceTag.new(object, method, self).to_check_box_tag(options, checked_value, unchecked_value)
|
||||||
|
@ -131,8 +131,8 @@ module ActionView
|
||||||
# Example (call, result). Imagine that @post.category returns "rails":
|
# Example (call, result). Imagine that @post.category returns "rails":
|
||||||
# radio_button("post", "category", "rails")
|
# radio_button("post", "category", "rails")
|
||||||
# radio_button("post", "category", "java")
|
# radio_button("post", "category", "java")
|
||||||
# <input type="radio" id="post_category" name="post[category] value="rails" checked="checked" />
|
# <input type="radio" id="post_category" name="post[category]" value="rails" checked="checked" />
|
||||||
# <input type="radio" id="post_category" name="post[category] value="java" />
|
# <input type="radio" id="post_category" name="post[category]" value="java" />
|
||||||
#
|
#
|
||||||
def radio_button(object, method, tag_value, options = {})
|
def radio_button(object, method, tag_value, options = {})
|
||||||
InstanceTag.new(object, method, self).to_radio_button_tag(tag_value, options)
|
InstanceTag.new(object, method, self).to_radio_button_tag(tag_value, options)
|
||||||
|
|
Loading…
Reference in a new issue