Permalink
Browse files

Cleaned up the DataMapper section

Signed-off-by: Chris Schneider <chris@christopher-schneider.com>
  • Loading branch information...
1 parent 82f79d6 commit f2e97f1501511fd623a843d5204536cbe0207fa4 @jdp jdp committed with Mar 23, 2009
Showing with 3 additions and 7 deletions.
  1. +3 −7 book/Models.markdown
View
10 book/Models.markdown
@@ -21,13 +21,9 @@ show started, and this example will include a 'Post' model.
property :body, Text
property :created_at, DateTime
end
-
-To automatically create the table for the 'Post' model if you haven't already,
-add a task to your rakefile to migrate your database:
-
- task :migrate do
- DataMapper.auto_migrate!
- end
+
+ # automatically create the post table
+ Post.auto_migrate! unless Post.table_exists?
Once that is all well and good, you can actually start developing your
application!

0 comments on commit f2e97f1

Please sign in to comment.