Skip to content

Instantly share code, notes, and snippets.

@eltiare
Created January 13, 2011 21:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save eltiare/778634 to your computer and use it in GitHub Desktop.
Save eltiare/778634 to your computer and use it in GitHub Desktop.
ree-1.8.7-2010.02 > post = Post.all[3]
typewhat_production['posts'].find({}, {})
=> #<Post _id: 4d2f69c90190bd17a7000001, created_at: Thu Jan 13 21:08:25 UTC 2011, image_filename: "captcha-hindi.png", title: "Zepplin 4?", updated_at: Thu Jan 13 21:15:27 UTC 2011, user_url: nil, approved: false, user_id: nil, user_name: "", approved_at: nil, user_email: "", : "">
ree-1.8.7-2010.02 > post.approve!
=> Thu, 13 Jan 2011 21:17:50 +0000
ree-1.8.7-2010.02 > post.save
MONGODB typewhat_production['posts'].update({"_id"=>BSON::ObjectId('4d2f69c90190bd17a7000001')}, {"$set"=>{"updated_at"=>Thu Jan 13 21:17:52 UTC 2011, "approved"=>true, "approved_at"=>Thu Jan 13 21:17:50 UTC 2011}})
=> true
ree-1.8.7-2010.02 > post.reload
typewhat_production['posts'].find({:_id=>BSON::ObjectId('4d2f69c90190bd17a7000001')}, {}).limit(-1)
=> #<Post _id: 4d2f69c90190bd17a7000001, created_at: Thu Jan 13 21:08:25 UTC 2011, image_filename: "captcha-hindi.png", title: "Zepplin 4?", updated_at: Thu Jan 13 21:15:27 UTC 2011, user_url: nil, approved: false, user_id: nil, user_name: "", approved_at: nil, user_email: "", : "">
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment