Class: AuditRails::Audit
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- AuditRails::Audit
- Defined in:
- app/models/audit_rails/audit.rb
Class Method Summary collapse
Class Method Details
.no_audit_entry_for_today?(action_name, user_name) ⇒ Boolean
5 6 7 8 9 |
# File 'app/models/audit_rails/audit.rb', line 5 def self.no_audit_entry_for_today?(action_name, user_name) audits = where(action: action_name, user_name: user_name, created_at: Time.now.to_date.beginning_of_day..Time.now.to_date.end_of_day) audits.blank? end |