Class: ViewModel::ActiveRecord::OwnedCollectionUpdate::Functional
- Inherits:
-
AbstractCollectionUpdate::Functional
- Object
- AbstractCollectionUpdate::Functional
- ViewModel::ActiveRecord::OwnedCollectionUpdate::Functional
- Defined in:
- lib/view_model/active_record/update_data.rb
Instance Attribute Summary
Attributes inherited from AbstractCollectionUpdate::Functional
Instance Method Summary collapse
Methods inherited from AbstractCollectionUpdate::Functional
#check_for_duplicates!, #contents, #initialize, #removed_vm_refs, #vm_references
Constructor Details
This class inherits a constructor from ViewModel::ActiveRecord::AbstractCollectionUpdate::Functional
Instance Method Details
#resolve_vm_reference(update_data, _update_context) ⇒ Object
285 286 287 |
# File 'lib/view_model/active_record/update_data.rb', line 285 def resolve_vm_reference(update_data, _update_context) update_data.viewmodel_reference if update_data.id end |
#used_vm_refs(update_context) ⇒ Object
279 280 281 282 283 |
# File 'lib/view_model/active_record/update_data.rb', line 279 def used_vm_refs(update_context) update_datas .map { |upd| resolve_vm_reference(upd, update_context) } .compact end |