Class: ROM::Mongo::Commands::Update

Inherits:
Commands::Update
  • Object
show all
Defined in:
lib/rom/mongo/commands.rb

Instance Method Summary collapse

Instance Method Details

#collectionObject



20
21
22
# File 'lib/rom/mongo/commands.rb', line 20

def collection
  relation.dataset
end

#execute(attributes) ⇒ Object



24
25
26
27
# File 'lib/rom/mongo/commands.rb', line 24

def execute(attributes)
  collection.update_all('$set' => attributes)
  collection.to_a
end