mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Fix a typo
This commit is contained in:
parent
6d4bb908b3
commit
6033d2c8c0
1 changed files with 2 additions and 2 deletions
|
@ -82,7 +82,7 @@ h4. Multiple Hashes in Form Helper Calls
|
|||
|
||||
The +form_tag+ helper accepts 2 arguments: the path for the action and an options hash. This hash specifies the method of form submission and HTML options such as the form element's class.
|
||||
|
||||
As with the +link_to+ helper, the path argument doesn't have to be given a string; it can be a hash of URL parameters recognizable by Rails' routing mechanism, which will turn the hash into a valid URL. However, since both arguments to +form_tag+ are hashes, you can easily run into a problem if you would like to specify both. For instance, let's say you write this:
|
||||
As with the +link_to+ helper, the path argument doesn't have to be given as a string; it can be a hash of URL parameters recognizable by Rails' routing mechanism, which will turn the hash into a valid URL. However, since both arguments to +form_tag+ are hashes, you can easily run into a problem if you would like to specify both. For instance, let's say you write this:
|
||||
|
||||
<ruby>
|
||||
form_tag(:controller => "people", :action => "search", :method => "get", :class => "nifty_form")
|
||||
|
@ -942,4 +942,4 @@ As a convenience you can instead pass the symbol +:all_blank+ which will create
|
|||
|
||||
h4. Adding Fields on the Fly
|
||||
|
||||
Rather than rendering multiple sets of fields ahead of time you may wish to add them only when a user clicks on an 'Add new child' button. Rails does not provide any builtin support for this. When generating new sets of fields you must ensure the the key of the associated array is unique - the current javascript date (milliseconds after the epoch) is a common choice.
|
||||
Rather than rendering multiple sets of fields ahead of time you may wish to add them only when a user clicks on an 'Add new child' button. Rails does not provide any builtin support for this. When generating new sets of fields you must ensure the the key of the associated array is unique - the current javascript date (milliseconds after the epoch) is a common choice.
|
||||
|
|
Loading…
Reference in a new issue