Class: ROM::Mongo::Commands::Update
- Inherits:
-
Commands::Update
- Object
- Commands::Update
- ROM::Mongo::Commands::Update
- Defined in:
- lib/rom/mongo/commands.rb
Instance Method Summary collapse
Instance Method Details
#collection ⇒ Object
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 |