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



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

def collection
  relation.dataset
end

#execute(attributes) ⇒ Object



28
29
30
31
# File 'lib/rom/mongo/commands.rb', line 28

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