Sha256: 94d94e63246b0e6e26d9b4ecbd9224e5d5322056ee488e803c1587c193498b8c
Contents?: true
Size: 682 Bytes
Versions: 6
Compression:
Stored size: 682 Bytes
Contents
# frozen_string_literal: true module ZuoraConnect # Added by @Vina # Description: This automatically stamp user created/updated the record for DataQuery Audit # Usage: add 'include ZuoraConnect::Auditable' to your model.rb that you would like to track module Auditable extend ActiveSupport::Concern included do before_create :set_created_by_id before_update :set_updated_by_id private def set_created_by_id self.created_by_id = ZuoraUser.current_user_id if defined?(created_by_id) end def set_updated_by_id self.updated_by_id = ZuoraUser.current_user_id if defined?(updated_by_id) end end end end
Version data entries
6 entries across 6 versions & 1 rubygems