aboutsummaryrefslogtreecommitdiffstats
path: root/railties
diff options
context:
space:
mode:
authorFrederick Cheung <frederick.cheung@gmail.com>2009-01-25 12:43:33 +0000
committerFrederick Cheung <frederick.cheung@gmail.com>2009-01-25 12:43:33 +0000
commitc6dbd5f45b53c54caf5a066dc66bc43c50108daf (patch)
tree659f41e878e9dd29d4d60bf5890e04e939b5e270 /railties
parent098dc68f5c627bfc2b8705762736096a2bae3b38 (diff)
downloadrails-c6dbd5f45b53c54caf5a066dc66bc43c50108daf.tar.gz
rails-c6dbd5f45b53c54caf5a066dc66bc43c50108daf.tar.bz2
rails-c6dbd5f45b53c54caf5a066dc66bc43c50108daf.zip
some missing fixed width words
Diffstat (limited to 'railties')
-rw-r--r--railties/doc/guides/source/form_helpers.txt4
1 files changed, 2 insertions, 2 deletions
diff --git a/railties/doc/guides/source/form_helpers.txt b/railties/doc/guides/source/form_helpers.txt
index a0c6fecdcc..de8ef9436b 100644
--- a/railties/doc/guides/source/form_helpers.txt
+++ b/railties/doc/guides/source/form_helpers.txt
@@ -276,7 +276,7 @@ You can create a similar binding without actually creating `<form>` tags with t
which produces the following output:
-------------
-<form action="/people/create" class="create_person" id="create_person" method="post">
+<form action="/people/create" class="new_person" id="new_person" method="post">
<input id="person_name" name="person[name]" size="30" type="text" />
<input id="contact_detail_phone_number" name="contact_detail[phone_number]" size="30" type="text" />
</form>
@@ -306,7 +306,7 @@ form_for(@article)
Notice how the short-style `form_for` invocation is conveniently the same, regardless of the record being new or existing. Record identification is smart enough to figure out if the record is new by asking `record.new_record?`. It also selects the correct path to submit to and the name based on the class of the object.
-Rails will also automatically set the class and id of the form appropriately: a form creating an article would have id and class `new_article`. If you were editing the article with id 23 the class would be set to `edit_article` and the id to `edit_article_23`. These attributes will be omitted for brevity in the rest of this guide.
+Rails will also automatically set the `class` and `id` of the form appropriately: a form creating an article would have `id` and `class` `new_article`. If you were editing the article with id 23 the `class` would be set to `edit_article` and the id to `edit_article_23`. These attributes will be omitted for brevity in the rest of this guide.
WARNING: When you're using STI (single-table inheritance) with your models, you can't rely on record identification on a subclass if only their parent class is declared a resource. You will have to specify the model name, `:url` and `:method` explicitly.