Commit 768a55c

mo <mo.khan@gmail.com>
2018-09-23 23:33:12
do not audit user_sessions#key|accessed_at
1 parent 7787e59
Changed files (2)
app
models
views
app/models/user_session.rb
@@ -1,7 +1,7 @@
 # frozen_string_literal: true
 
 class UserSession < ApplicationRecord
-  audited associated_with: :user
+  audited associated_with: :user, except: [:key, :accessed_at]
   belongs_to :user
   before_validation do |model|
     model.key = SecureRandom.urlsafe_base64(32)
app/views/my/audits/index.html.erb
@@ -1,7 +1,7 @@
 <div class="container">
   <div class="row">
     <div class="col">
-      <h1><%= t('.title') %></h1>
+      <h1><%= t('.title') %> <%= @audits.count %></h1>
       <table class="table">
         <thead>
           <th>Auditable</th>