Sha256: 896028e5795089f5c3f7aad391c4fa02752bfc7fd05373fe3928e533931ed783
Contents?: true
Size: 557 Bytes
Versions: 9
Compression:
Stored size: 557 Bytes
Contents
# frozen_string_literal: true module Loggable extend ActiveSupport::Concern def log_created(obj) log_action('Created', obj) end def log_updated(obj) log_action('Updated', obj) end def log_deleted_fs(obj) msg = "Deleted All Files from #{obj.id}" Rails.logger.info("#{msg} (#{Array(obj.attributes[work_identifier]).first})") end private def log_action(action, obj) msg = "#{action} #{obj.class.model_name.human} #{obj.id}" Rails.logger.info("#{msg} (#{Array(obj.attributes[work_identifier]).first})") end end
Version data entries
9 entries across 9 versions & 1 rubygems