Sha256: 752623d08bd53a81cd827ee326f21b97cc7cced3ab1cdf4e83756ecfeac4a7c9

Contents?: true

Size: 229 Bytes

Versions: 17

Compression:

Stored size: 229 Bytes

Contents

require './helper'

class UpdateEx
  include MongoMapper::Document

  key :a
  key :b
  key :c
end

u = UpdateEx.create(:a => 1, :b => 0, :c => 1)

u.safe_update(%w[a c], {"a" => 3, "b" => 3, "c" => 3})
puts u.attributes.inspect

Version data entries

17 entries across 17 versions & 1 rubygems

Version Path
mongomapper_ext-0.5.2 examples/update.rb
mongomapper_ext-0.5.1 examples/update.rb
mongomapper_ext-0.5.0 examples/update.rb
mongomapper_ext-0.4.0 examples/update.rb
mongomapper_ext-0.3.0 examples/update.rb
mongomapper_ext-0.2.4 examples/update.rb
mongomapper_ext-0.2.3 examples/update.rb
mongomapper_ext-0.2.2 examples/update.rb
mongomapper_ext-0.2.1 examples/update.rb
mongomapper_ext-0.2.0 examples/update.rb
mongomapper_ext-0.1.5 examples/update.rb
mongomapper_ext-0.1.4 examples/update.rb
mongomapper_ext-0.1.3 examples/update.rb
mongomapper_ext-0.1.2 examples/update.rb
mongomapper_ext-0.1.1 examples/update.rb
mongomapper_ext-0.1.0 examples/update.rb
mongomapper_ext-0.0.4 examples/update.rb