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
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 |