Module: ReactiveRecord::UnscopedCollection
- Defined in:
- lib/reactive_record/active_record/reactive_record/unscoped_collection.rb
Overview
The base collection class works with relationships method overrides for the unscoped collection
Instance Method Summary collapse
- #set_pre_sync_related_records(related_records, _record = nil) ⇒ Object
- #sync_scopes(related_records, record, filtering = true) ⇒ Object
Instance Method Details
#set_pre_sync_related_records(related_records, _record = nil) ⇒ Object
5 6 7 8 |
# File 'lib/reactive_record/active_record/reactive_record/unscoped_collection.rb', line 5 def (, _record = nil) @pre_sync_related_records = live_scopes.each { |scope| scope.(@pre_sync_related_records) } end |
#sync_scopes(related_records, record, filtering = true) ⇒ Object
10 11 12 13 14 |
# File 'lib/reactive_record/active_record/reactive_record/unscoped_collection.rb', line 10 def sync_scopes(, record, filtering = true) live_scopes.each { |scope| scope.sync_scopes(, record, filtering) } ensure @pre_sync_related_records = nil end |