Class: LogStore
- Inherits:
-
Object
- Object
- LogStore
- Defined in:
- lib/action_audit/log_store.rb
Instance Method Summary collapse
Instance Method Details
#save_change(action_id, entity, was, become) ⇒ Object
10 11 12 13 14 15 16 17 18 |
# 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) ⇒ Object
4 5 6 7 8 |
# File 'lib/action_audit/log_store.rb', line 4 def upsert_action(params, id) id ||= SecureRandom.uuid info "[action] [#{id}] #{params}" id end |