class Mongoid::SimpleAudit::Audit
Public Class Methods
find_by_auditable(auditable)
click to toggle source
# File lib/mongoid/simple_audit/audit.rb, line 21 def self.find_by_auditable auditable self.by_auditable( auditable ).first end
find_or_create_by_auditable(auditable)
click to toggle source
# File lib/mongoid/simple_audit/audit.rb, line 17 def self.find_or_create_by_auditable auditable self.find_or_create_by( auditable_type: auditable.class.name, auditable_id: auditable.id ) end