class LogStore

Public Instance Methods

save_change(action_id, entity, was, become) click to toggle source
# File lib/action_audit/log_store.rb, line 10
def save_change(action_id, entity, was, become)
  params = {
    entity_id: entity.id,
    entity_type: entity.class.name,
    was: was,
    become: become
  }
  info "[changeset] [#{action_id}] #{params}"
end
upsert_action(params, id) click to toggle source
# File lib/action_audit/log_store.rb, line 4
def upsert_action(params, id)
  id ||= SecureRandom.uuid
  info "[action] [#{id}] #{params}"
  id
end