PlaceOS::Model::History::Tracked
Records changes to a model in the History table.
Creates and updates are captured by pg-orm's on_persist hook, after every
before_* callback and validation have run, so the entry reflects what was
written. Deletes are captured by after_destroy. Entries are written in the
same transaction as the change.
class Zone < ModelBase
include History::Tracked
history_ignore :last_seen
history_redact :secret
end
Override history_resource_id, history_correlation_id or
history_record_as to customise what is recorded.
Constants
REDACTED = JSON::Any.new("[REDACTED]")
Instance methods
Macros
history_ignore(*fields)
Fields not recorded, changes to only these fields are not recorded at all