Permalink
Browse files

Fixed doc re. associations

  • Loading branch information...
1 parent 3508f52 commit 18054beb3cd1380972479768653ee647c5bd6d22 mde committed Mar 27, 2013
Showing with 3 additions and 1 deletion.
  1. +3 −1 README.md
View
@@ -370,10 +370,12 @@ var user = User.create({
, confirmPassword: 'zerb'
});
user.save(function (err, data) {
+ var profile;
if (err) {
throw err;
}
- user.setProfile(Profile.create({}));
+ profile = Profile.create({});
+ user.setProfile(profile);
user.save(function (err, data) {
if (err) {
throw err;

0 comments on commit 18054be

Please sign in to comment.