Sha256: 15d52238b86254192f5122e560dd543f48eb52824cecf002679b836a4aa402d2

Contents?: true

Size: 527 Bytes

Versions: 158

Compression:

Stored size: 527 Bytes

Contents

# Mongoid 2.x does not track Array field changes accurately.
# Accessing an array field will mark it dirty which becomes problematic
# for workflow callbacks, e.g. when checking if a published edition is being edited.
# See https://github.com/mongoid/mongoid/issues/2311 for details of the mongoid issue.
#
module Mongoid
  module Dirty
    def changes
      _changes = {}
      changed.each do |attr|
        change = attribute_change(attr)
        _changes[attr] = change if change
      end
      _changes
    end
  end
end

Version data entries

158 entries across 158 versions & 1 rubygems

Version Path
govuk_content_models-47.0.0 lib/mongoid/monkey_patches.rb
govuk_content_models-46.0.1 lib/mongoid/monkey_patches.rb
govuk_content_models-46.0.0 lib/mongoid/monkey_patches.rb
govuk_content_models-45.0.0 lib/mongoid/monkey_patches.rb
govuk_content_models-44.4.0 lib/mongoid/monkey_patches.rb
govuk_content_models-44.3.0 lib/mongoid/monkey_patches.rb
govuk_content_models-44.2.1 lib/mongoid/monkey_patches.rb
govuk_content_models-44.2.0 lib/mongoid/monkey_patches.rb
govuk_content_models-44.1.0 lib/mongoid/monkey_patches.rb
govuk_content_models-44.0.1 lib/mongoid/monkey_patches.rb
govuk_content_models-44.0.0 lib/mongoid/monkey_patches.rb
govuk_content_models-43.2.0 lib/mongoid/monkey_patches.rb
govuk_content_models-43.1.0 lib/mongoid/monkey_patches.rb
govuk_content_models-43.0.1 lib/mongoid/monkey_patches.rb
govuk_content_models-43.0.0 lib/mongoid/monkey_patches.rb
govuk_content_models-42.1.0 lib/mongoid/monkey_patches.rb
govuk_content_models-42.0.1 lib/mongoid/monkey_patches.rb
govuk_content_models-42.0.0 lib/mongoid/monkey_patches.rb
govuk_content_models-41.1.1 lib/mongoid/monkey_patches.rb
govuk_content_models-41.1.0 lib/mongoid/monkey_patches.rb