Sha256: 6223d9ddba7909456073807f8b9a59aca126003e0ce3dca62f980cee8f379a2c
Contents?: true
Size: 449 Bytes
Versions: 9
Compression:
Stored size: 449 Bytes
Contents
# frozen_string_literal: true module TemporalTables module Whodunnit def self.included(base) base.class_eval do include InstanceMethods before_validation :set_updated_by end end module InstanceMethods def set_updated_by return unless TemporalTables.updated_by_proc && respond_to?(:updated_by) self.updated_by = TemporalTables.updated_by_proc.call(self) end end end end
Version data entries
9 entries across 9 versions & 1 rubygems