Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
tree: c3e5cbfc97
Fetching contributors…

Cannot retrieve contributors at this time

12 lines (10 sloc) 0.315 kb
require 'adapter/mongo'
Adapter.define(:mongo_atomic, Adapter::Mongo) do
# Public
def write(key, attributes, options = nil)
criteria = {:_id => key}
updates = {'$set' => attributes}
options = operation_options(options).merge(:upsert => true)
client.update(criteria, updates, options)
end
end
Jump to Line
Something went wrong with that request. Please try again.