Guest User

Untitled

a guest
Feb 18th, 2018
69
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.26 KB | None | 0 0
  1. require 'mongo'
  2.  
  3. db = Mongo::Connection.new.db("jobs")
  4. job_collection = db["job_collection"]
  5.  
  6. job_collection.insert({
  7. :id => 1,
  8. :name => "test"
  9. })
  10.  
  11. job_collection.find().each do |document|
  12. p "Document #{document['id']}: #{document['name']}"
  13. end
Add Comment
Please, Sign In to add comment