Sha256: e155417dc705b55b5bc21a304f541b32b243d36edf789b76629cffadcb8bdb77

Contents?: true

Size: 371 Bytes

Versions: 6

Compression:

Stored size: 371 Bytes

Contents

module AuditRails
  class Audit < ActiveRecord::Base
    attr_accessible :action, :controller, :description, :user_name

    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
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
audit_rails-0.1.3 app/models/audit_rails/audit.rb
audit_rails-0.1.2 app/models/audit_rails/audit.rb
audit_rails-0.1.1 app/models/audit_rails/audit.rb
audit_rails-0.1.0 app/models/audit_rails/audit.rb
audit_rails-0.0.2 app/models/audit_rails/audit.rb
audit_rails-0.0.1 app/models/audit_rails/audit.rb