public
Description: Repository for improving Rails documentation
Homepage: http://www.rubyonrails.org
Clone URL: git://github.com/lifo/doc-rails.git
Search Repo:
Fix form helper examples to match current behaviour
miloops (author)
Wed Mar 19 03:46:48 -0700 2008
commit  cf13b8b697b9a13f3d62c9eb22f3bc40a0887802
tree    55e0b1b94160407adfb9b7f97585971eb151a60b
parent  2849e47bab94e916da0cef7d577950359c377532
...
405
406
407
408
 
409
410
411
...
413
414
415
416
417
 
 
418
419
420
421
...
430
431
432
433
434
 
 
435
436
437
438
439
 
 
440
441
442
...
405
406
407
 
408
409
410
411
...
413
414
415
 
 
416
417
418
419
420
421
...
430
431
432
 
 
433
434
435
436
437
 
 
438
439
440
441
442
0
@@ -405,7 +405,7 @@
0
       # ==== Examples
0
       # # Let's say that @post.validated? is 1:
0
       # check_box("post", "validated")
0
- # # => <input type="checkbox" id="post_validate" name="post[validated]" value="1" checked="checked" />
0
+ # # => <input type="checkbox" id="post_validated" name="post[validated]" value="1" checked="checked" />
0
       # # <input name="post[validated]" type="hidden" value="0" />
0
       #
0
       # # Let's say that @puppy.gooddog is "no":
0
@@ -413,8 +413,8 @@
0
       # # => <input type="checkbox" id="puppy_gooddog" name="puppy[gooddog]" value="yes" />
0
       # # <input name="puppy[gooddog]" type="hidden" value="no" />
0
       #
0
- # check_box("eula", "accepted", {}, "yes", "no", :class => 'eula_check')
0
- # # => <input type="checkbox" id="eula_accepted" name="eula[accepted]" value="no" />
0
+ # check_box("eula", "accepted", { :class => 'eula_check' }, "yes", "no")
0
+ # # => <input type="checkbox" id="eula_accepted" name="eula[accepted]" value="yes" />
0
       # # <input name="eula[accepted]" type="hidden" value="no" />
0
       #
0
       def check_box(object_name, method, options = {}, checked_value = "1", unchecked_value = "0")
0
0
@@ -430,13 +430,13 @@
0
       # # Let's say that @post.category returns "rails":
0
       # radio_button("post", "category", "rails")
0
       # radio_button("post", "category", "java")
0
- # # => <input type="radio" id="post_category" name="post[category]" value="rails" checked="checked" />
0
- # # <input type="radio" id="post_category" name="post[category]" value="java" />
0
+ # # => <input type="radio" id="post_category_rails" name="post[category]" value="rails" checked="checked" />
0
+ # # <input type="radio" id="post_category_java" name="post[category]" value="java" />
0
       #
0
       # radio_button("user", "receive_newsletter", "yes")
0
       # radio_button("user", "receive_newsletter", "no")
0
- # # => <input type="radio" id="user_receive_newsletter" name="user[receive_newsletter]" value="yes" />
0
- # # <input type="radio" id="user_receive_newsletter" name="user[receive_newsletter]" value="no" checked="checked" />
0
+ # # => <input type="radio" id="user_receive_newsletter_yes" name="user[receive_newsletter]" value="yes" />
0
+ # # <input type="radio" id="user_receive_newsletter_no" name="user[receive_newsletter]" value="no" checked="checked" />
0
       def radio_button(object_name, method, tag_value, options = {})
0
         InstanceTag.new(object_name, method, self, nil, options.delete(:object)).to_radio_button_tag(tag_value, options)
0
       end

Comments

    No one has commented yet.