Sha256: 0e4ef2d53c97b687636273788985dcef520506c53e61261182d8913dc42c4a6e

Contents?: true

Size: 382 Bytes

Versions: 6

Compression:

Stored size: 382 Bytes

Contents

module CableReady
  module Updatable
    class CollectionUpdatableCallbacks
      def initialize(operation)
        @operation = operation
      end

      def after_commit(model)
        update_collections(model)
      end

      private

      def update_collections(model)
        model.class.cable_ready_collections.broadcast_for!(model, @operation)
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
cable_ready-5.0.0.pre9 app/models/concerns/cable_ready/updatable/collection_updatable_callbacks.rb
cable_ready-5.0.0.pre8 app/models/concerns/cable_ready/updatable/collection_updatable_callbacks.rb
cable_ready-5.0.0.pre7 app/models/concerns/cable_ready/updatable/collection_updatable_callbacks.rb
cable_ready-5.0.0.pre6 app/models/concerns/cable_ready/updatable/collection_updatable_callbacks.rb
cable_ready-5.0.0.pre5 app/models/concerns/cable_ready/updatable/collection_updatable_callbacks.rb
cable_ready-5.0.0.pre4 app/models/concerns/cable_ready/updatable/collection_updatable_callbacks.rb