Project

General

Profile

« Previous | Next » 

Revision 38f854cd

Added by Tomer Brisker almost 6 years ago

Fixes #23965 - Only save ids for association audits (#5753)

Otherwise, we have issues when trying to check revisions of the audit
since it will fail trying to assign a string to an attribute that
expects an object id.

View differences:

app/models/concerns/dirty_associations.rb
def dirty_has_many_associations(*args)
extension = Module.new do
args.each do |association|
association_ids = association.to_s.singularize + '_ids'
association_ids = association.to_s
association_ids = association_ids.singularize + '_ids' unless association.to_s.end_with?('_ids')
# result for :organizations
# def organization_ids_with_change_detection=(organizations)

Also available in: Unified diff