Sha256: fded7379f050aad01b8737994b03f9540d982c2fc6c3817f22cbf0445f360592
Contents?: true
Size: 412 Bytes
Versions: 44
Compression:
Stored size: 412 Bytes
Contents
Audited::Audit.class_eval do before_validation do if account_id.nil? if auditable.respond_to?(:account_id) self.account_id = auditable.account_id elsif auditable_type == 'Account' self.account_id = auditable.id elsif ActsAsTenant.current_tenant.present? self.account = ActsAsTenant.current_tenant end end end belongs_to :account, optional: true end
Version data entries
44 entries across 44 versions & 1 rubygems