Skip to content

Commit

Permalink
mention database mapping in getting started guide
Browse files Browse the repository at this point in the history
  • Loading branch information
oscardelben committed May 4, 2012
1 parent 026e0d1 commit c058a77
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion guides/source/getting_started.textile
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit c058a77

Please sign in to comment.