Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Aaannnddd more README tweaks.

  • Loading branch information...
commit c4f99a4c2fc116e66677ae6083d69b83797cce81 1 parent 7e439d5
@notahat notahat authored
Showing with 10 additions and 9 deletions.
  1. +10 −9 README.markdown
View
19 README.markdown
@@ -143,13 +143,7 @@ If your object needs associated objects, you can generate them like this:
Calling `Comment.make!` will construct a Comment and its associated Post, and
save both.
-
-If you want to override the value for post when constructing the comment, you
-can do this:
-
- post = Post.make(:title => "A particular title)
- comment = Comment.make(:post => post)
-
+
Machinist is smart enough to look at the association and work out what sort of
object it needs to create, so you can shorten the above blueprint to:
@@ -157,11 +151,18 @@ object it needs to create, so you can shorten the above blueprint to:
post
end
+If you want to override the value for post when constructing the comment, you
+can do this:
+
+ post = Post.make(:title => "A particular title)
+ comment = Comment.make(:post => post)
+
+
For `has_many` and `has_and_belongs_to_many` associations, you can create
multiple associated objects like this:
Post.blueprint do
- comments(3)
+ comments(3) # Makes 3 comments.
end
@@ -239,7 +240,7 @@ Compatibility patches are welcome.
## Developing
The Machinist specs and source code were written to be read, and I'm pretty
-happy with them. Don't be have a look under the hood.
+happy with them. Don't be afraid to have a look under the hood!
If you want to submit a patch:
Please sign in to comment.
Something went wrong with that request. Please try again.