Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- require 'mongo'
- db = Mongo::Connection.new.db("jobs")
- job_collection = db["job_collection"]
- job_collection.insert({
- :id => 1,
- :name => "test"
- })
- job_collection.find().each do |document|
- p "Document #{document['id']}: #{document['name']}"
- end
Add Comment
Please, Sign In to add comment