Class: Signoff::Event
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- Signoff::Event
- Defined in:
- app/models/signoff/event.rb
Overview
The immutable audit record written for every workflow transition.
Columns: workflowable (polymorphic), user_id, action, from_state, to_state, comment, metadata (jsonb), ip_address, user_agent, created_at.
Instance Method Summary collapse
-
#readonly? ⇒ Boolean
Audit rows are append-only.
Instance Method Details
#readonly? ⇒ Boolean
Audit rows are append-only. Once persisted they cannot be modified or destroyed through ActiveRecord unless config.immutable_events is false.
32 33 34 35 36 |
# File 'app/models/signoff/event.rb', line 32 def readonly? return super unless Signoff.configuration.immutable_events persisted? || super end |