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
281 282 283 |
# File 'lib/view_model/active_record/update_data.rb', line 281 def resolve_vm_reference(update_data, _update_context) update_data.viewmodel_reference if update_data.id end |
#used_vm_refs(update_context) ⇒ Object
275 276 277 278 279 |
# File 'lib/view_model/active_record/update_data.rb', line 275 def used_vm_refs(update_context) update_datas .map { |upd| resolve_vm_reference(upd, update_context) } .compact end |