I know that this is not an effective way to do this, but thatβs how I do it.
In the Rails console, I get a report that I know is being checked.
@page = Page.first
Then I get this first audit of the record.
@audit = @page.audits.first
Then you can call #class on @audit
@audit.class
Result:
Audited::Adapters::ActiveRecord::Audit(id: integer, created_at: datetime, updated_at: datetime, auditable_id: integer, auditable_type: string, user_id: integer, user_type: string, username: string, action: string, audited_changes: text, version: integer, comment: string, full_model: text, remote_address: string, associated_id: integer, associated_type: string, request_uuid: string)
Audited::Adapters::ActiveRecord::Audit is the name of the class that you can use in your search.
audits = Audited::Adapters::ActiveRecord::Audit.where(:user_id => 8675309)
Tass
source share