aboutsummaryrefslogtreecommitdiffstats
path: root/railties/doc/guides/migrations/writing_a_migration.txt
diff options
context:
space:
mode:
authorFrederick Cheung <frederick.cheung@gmail.com>2008-09-11 10:20:24 +0100
committerFrederick Cheung <frederick.cheung@gmail.com>2008-09-11 10:24:10 +0100
commitc6da7c536c13555eba6aca82e0b5385b86b21211 (patch)
treee33241135ba565a2dc9a74f462aa5807984282ab /railties/doc/guides/migrations/writing_a_migration.txt
parent1a8edd303de575545ccb90ef11abdc005e9cc48f (diff)
downloadrails-c6da7c536c13555eba6aca82e0b5385b86b21211.tar.gz
rails-c6da7c536c13555eba6aca82e0b5385b86b21211.tar.bz2
rails-c6da7c536c13555eba6aca82e0b5385b86b21211.zip
Fixed many typos
Diffstat (limited to 'railties/doc/guides/migrations/writing_a_migration.txt')
-rw-r--r--railties/doc/guides/migrations/writing_a_migration.txt8
1 files changed, 4 insertions, 4 deletions
diff --git a/railties/doc/guides/migrations/writing_a_migration.txt b/railties/doc/guides/migrations/writing_a_migration.txt
index d791658278..09b0c53df8 100644
--- a/railties/doc/guides/migrations/writing_a_migration.txt
+++ b/railties/doc/guides/migrations/writing_a_migration.txt
@@ -12,7 +12,7 @@ create_table :products do |t|
t.string :name
end
---------------------
-which creates a products table with a column called name (and as discussed below, an implicit id column).
+which creates a `products` table with a column called `name` (and as discussed below, an implicit `id` column).
The object yielded to the block allows you create columns on the table. There are two ways of the doing this. The first looks like
@@ -120,7 +120,7 @@ end
---------------------
will add an `attachment_id` column and a string `attachment_type` column with a default value of 'Photo'.
-NOTE: The `references` helper does not actually create <<foreign_key,foreign key>> constraints for you. You will need to use execute for that.
+NOTE: The `references` helper does not actually create <<foreign_key,foreign key>> constraints for you. You will need to use `execute` for that.
If the helpers provided by Active Record aren't enough you can use the `execute` function to execute arbitrary SQL.
@@ -128,7 +128,7 @@ For more details and examples of individual methods check the API documentation.
=== Writing your down method ===
-The `down` method of your migration should revert the transformations done by the up method. In other words the database should be unchanged if you do an up followed by a down. For example if you create a table in the up you should drop it in the down method. It is wise to do things in precisely the reverse order to in the the up method. For example
+The `down` method of your migration should revert the transformations done by the `up` method. In other words the database should be unchanged if you do an `up` followed by a `down`. For example if you create a table in the up you should drop it in the `down` method. It is wise to do things in precisely the reverse order to in the `up` method. For example
[source, ruby]
---------------------
@@ -154,6 +154,6 @@ class ExampleMigration < ActiveRecord::Migration
end
end
---------------------
-Sometimes your migration will do something which is just plain irreversible, for example it might destroy some data. In cases like those when you can't reverse the migration you can raise IrreversibleMigration from your down method. If someone tries to revert your migration an error message will be
+Sometimes your migration will do something which is just plain irreversible, for example it might destroy some data. In cases like those when you can't reverse the migration you can raise IrreversibleMigration from your `down` method. If someone tries to revert your migration an error message will be
displayed saying that it can't be done.