Skip to content

Commit 73bc415

Browse files
committed
Fix Audited::Audit constant error for Rails 7 compatibility
- Add explicit require for 'audited/audit' to ensure proper load order - Change VulcanAudit to inherit from Audited::Audit directly - This fixes the 'uninitialized constant Audited::Audit' error in Rails 7 - The issue was caused by load order - the audit class needs to be loaded before inheritance Co-Authored-By: Aaron Lippold <[email protected]>
1 parent 261ccc8 commit 73bc415

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

app/lib/vulcan_audit.rb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
# frozen_string_literal: true
22

3+
require 'audited/audit'
4+
35
# Custom Audited class for Vulcan-specific methods for interacting with audits.
46
class VulcanAudit < Audited::Audit
57
belongs_to :audited_user, class_name: 'User', optional: true

0 commit comments

Comments
 (0)