Class: RakeAudit::TaskExecution
- Inherits:
-
Object
- Object
- RakeAudit::TaskExecution
- Defined in:
- app/models/rake_audit/task_execution.rb
Overview
ActiveRecord model backing the rake_task_executions table.
This is the persistence target of Adapters::ActiveRecordAdapter, which calls TaskExecution.create!(record.to_h) with the twelve fields a TaskExecutionRecord serializes. The four columns that are always populated for a completed execution carry presence validations so a malformed record fails loudly rather than persisting a partial row.
When the host application defines an ApplicationRecord the model inherits from it (picking up the app’s connection and conventions); otherwise it falls back to ActiveRecord::Base so the gem also works in a plain ActiveRecord setup without Rails.