diff options
author | Oscar Del Ben <info@oscardelben.com> | 2012-05-04 08:36:30 +0200 |
---|---|---|
committer | Oscar Del Ben <info@oscardelben.com> | 2012-05-04 08:36:30 +0200 |
commit | c058a773b89b1bf4103f9bd4910743f60f238792 (patch) | |
tree | 5ac218d774a9976eb5e084a489daef1ba76dd080 /guides/source/getting_started.textile | |
parent | 026e0d1c4df68c3471a93b0f9d90a581d1511bd1 (diff) | |
download | rails-c058a773b89b1bf4103f9bd4910743f60f238792.tar.gz rails-c058a773b89b1bf4103f9bd4910743f60f238792.tar.bz2 rails-c058a773b89b1bf4103f9bd4910743f60f238792.zip |
mention database mapping in getting started guide
Diffstat (limited to 'guides/source/getting_started.textile')
-rw-r--r-- | guides/source/getting_started.textile | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/guides/source/getting_started.textile b/guides/source/getting_started.textile index 31eb332c89..947abd7ba0 100644 --- a/guides/source/getting_started.textile +++ b/guides/source/getting_started.textile @@ -404,7 +404,10 @@ $ rails generate model Post title:string text:text With that command we told Rails that we want a +Post+ model, which in turn should have a title attribute of type string, and a text attribute -of type text. Rails in turn responded by creating a bunch of files. For +of type text. Those attributes are automatically added to the +posts+ +table in the database and mapped to the +Post+ model. + +Rails in turn responded by creating a bunch of files. For now, we're only interested in +app/models/post.rb+ and +db/migrate/20120419084633_create_posts.rb+. The latter is responsible for creating the database structure, which is what we'll look at next. |