Sha256: 4e9f5ac181b63f22ea53cbe394cf73caff2f01d088bd938bf5d3eb994bb1c9c8

Contents?: true

Size: 389 Bytes

Versions: 6

Compression:

Stored size: 389 Bytes

Contents

module Ddr::Datastreams
  class ContentDatastream < ExternalFileDatastream

    CONTENT_CHANGED = "content_changed.content.repo_file"

    around_save :notify_content_changed, if: [:external?, :dsLocation_changed?]

    private

    def notify_content_changed
      ActiveSupport::Notifications.instrument(CONTENT_CHANGED, pid: pid) do |payload|
        yield
      end
    end

  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
ddr-models-2.11.0 lib/ddr/datastreams/content_datastream.rb
ddr-models-2.10.2 lib/ddr/datastreams/content_datastream.rb
ddr-models-2.10.1 lib/ddr/datastreams/content_datastream.rb
ddr-models-2.10.0 lib/ddr/datastreams/content_datastream.rb
ddr-models-2.10.0.rc2 lib/ddr/datastreams/content_datastream.rb
ddr-models-2.10.0.rc1 lib/ddr/datastreams/content_datastream.rb