Class: Cuprum::Rails::Commands::UpdateOne
- Inherits:
-
Cuprum::Rails::Command
- Object
- Collections::Command
- Cuprum::Rails::Command
- Cuprum::Rails::Commands::UpdateOne
- Defined in:
- lib/cuprum/rails/commands/update_one.rb
Overview
Command for updating an ActiveRecord record in the collection.
Instance Attribute Summary
Attributes inherited from Cuprum::Rails::Command
#collection_name, #member_name, #options, #record_class
Instance Method Summary collapse
-
#call(entity: ) ⇒ Cuprum::Result<ActiveRecord::Base>
Updates the record in the collection.
Methods inherited from Cuprum::Rails::Command
#initialize, #primary_key_name, #primary_key_type, subclass
Constructor Details
This class inherits a constructor from Cuprum::Rails::Command
Instance Method Details
#call(entity: ) ⇒ Cuprum::Result<ActiveRecord::Base>
Updates the record in the collection.
If the collection does not already have a record with the same primary key, #call will fail and the collection will not be updated.
21 22 23 |
# File 'lib/cuprum/rails/commands/update_one.rb', line 21 validate_parameters :call do keyword :entity, Object end |