Sha256: ca5f3e3c3906c9ebfda45203f2c9a10220f8c7f06c2396d96d845060f7eb92f3

Contents?: true

Size: 598 Bytes

Versions: 30

Compression:

Stored size: 598 Bytes

Contents

module ReactiveRecord
  # The base collection class works with relationships
  # method overrides for the unscoped collection
  module UnscopedCollection
    def set_pre_sync_related_records(related_records, _record = nil)
      @pre_sync_related_records = related_records
      live_scopes.each { |scope| scope.set_pre_sync_related_records(@pre_sync_related_records) }
    end

    def sync_scopes(related_records, record, filtering = true)
      live_scopes.each { |scope| scope.sync_scopes(related_records, record, filtering) }
    ensure
      @pre_sync_related_records = nil
    end
  end
end

Version data entries

30 entries across 30 versions & 2 rubygems

Version Path
hyper-mesh-1.0.0.lap24 lib/reactive_record/active_record/reactive_record/unscoped_collection.rb
hyper-mesh-1.0.0.lap23 lib/reactive_record/active_record/reactive_record/unscoped_collection.rb
hyper-mesh-1.0.0.lap22 lib/reactive_record/active_record/reactive_record/unscoped_collection.rb
hyper-mesh-0.6.0 lib/reactive_record/active_record/reactive_record/unscoped_collection.rb
hyper-mesh-0.5.4 lib/reactive_record/active_record/reactive_record/unscoped_collection.rb
hyper-mesh-0.5.3 lib/reactive_record/active_record/reactive_record/unscoped_collection.rb
hyper-mesh-0.5.2 lib/reactive_record/active_record/reactive_record/unscoped_collection.rb
hyper-mesh-0.5.1 lib/reactive_record/active_record/reactive_record/unscoped_collection.rb
hyper-mesh-0.5.0 lib/reactive_record/active_record/reactive_record/unscoped_collection.rb
hyper-mesh-0.4.0 lib/reactive_record/active_record/reactive_record/unscoped_collection.rb