Questions tagged [acts-as-audited]

Audited (formerly acts_as_audited) is an ORM extension that logs all changes to your Rails models.

(formerly acts_as_audited) is an extension that logs all changes to your Rails models.

60 questions
1
vote
1 answer

Are ActiveRecord callbacks called in the join table in an HABTM relationship?

While testing acts_as_audited, I discovered (as also described here) that the :with_associations flag does not produce audit table entries for HABTM relationships. For example: User < ActiveRecord::Base has_and_belongs_to_many: :groups …
1
vote
1 answer

How to temporarily disable acts_as_audited and actionmailer, run a script then reenable

This might be quite simple, but I am tearing my hair out. I have a script that I want to run on a daily basis, the script updates a ton of records( across 20 different models) and I dont really care about maintaining an audit trail of these mass…
Faraaz Khan
  • 701
  • 2
  • 8
  • 13
1
vote
0 answers

ruby gem audited doesn't record created_at and updated_at

ruby "2.6.3" gem "audited", "4.8.0" gem "pg", "0.18.4" I need to be able to: search revisions by date range search all the audits by date range then get the latest of each record Currently the record's revision has nil for created_at and…
Sarah A
  • 1,185
  • 12
  • 27
1
vote
0 answers

Audited gem to list tracked changes in admin panel

I have created rails application with models: User, InvestmentUpdate and PortfolioContent. I'm using audited gem to track changes and list them in admin panel for the models InvestmentUpdate and PortfolioContent. Currently, I am using rails adminand…
shreejana
  • 391
  • 3
  • 20
1
vote
1 answer

Destroy confirmation popup with input

Is there any simple way to pass parameters to destroy confirm button? I don't want to display only "Are you sure?" message with OK/Cancel buttons. I want to pass some parameters which will be saved as a comment to the deleted object. I would like to…
Jan Krupa
  • 484
  • 9
  • 21
1
vote
1 answer

Audited - get instance of auditable object

I want to extend Audit record with some more information from the auditable type instance. I've extended Audit behavior by config/initializers/audited.rb class AuditExtension < Audited::Audit before_save :resolve_association def…
Jan Krupa
  • 484
  • 9
  • 21
1
vote
2 answers

Audited: Associated audits with HABTM relation

I've got model user and role class User < ApplicationRecord rolify strict: true has_many :roles, through: :users_roles has_associated_audits class Role < ApplicationRecord has_and_belongs_to_many :users, join_table: :users_roles audited…
Jan Krupa
  • 484
  • 9
  • 21
1
vote
2 answers

Having trouble getting acts_as_audited installed

I'm trying to install acts_as_audited on rails 3, but the docs seem to only refer to pre rails 3 style installs, anyone got any tips? Heres the details, https://github.com/collectiveidea/acts_as_audited I have the gem installed, it shows up when I…
Rails Fan
  • 121
  • 1
  • 12
1
vote
2 answers

Rails: How to access two models in a single loop

I am using Audited gem to track the changes done on users. What I want to display exactly is the changes made which is the audits with the time they are updated at in a same row.I tried to display it this way but it makes repetitions. <% @users.each…
Nejweti
  • 113
  • 2
  • 11
1
vote
0 answers

audited gem - disable logging for a group

in a RoR application i'm using devise for authentications and audited for logging purpose. Can I disable logging features (audited) for a specific user or group? Thanks to all.
EffeBi
  • 309
  • 3
  • 11
1
vote
1 answer

Filter out the results based on audited changes with rails audited gem

I am using the audited gem for tracking changes to a record. An audit object looks like id: 1, auditable_id: 1, auditable_type: "Customer", associated_id: nil, associated_type: nil, user_id: nil, user_type: nil, username: nil, …
Pallavi Hegde
  • 219
  • 2
  • 15
1
vote
1 answer

why not insert a watch to the top level directory with auditctl?

With the man manual, I know some information about auditctl. But with the option -w path, I found some information as follow: Insert a watch for the file system object at path. You cannot insert a watch to the top level directory. This is…
alexzhang
  • 11
  • 1
1
vote
1 answer

Storing logs in separate database using secondbase and audited gem

I'm having a Rails 4 application with database PostgreSQL. I want to store all log changes of topic model in a different database. Is it possible to use secondbase and audited gem together. What is the best way to do it?. I have been trying this for…
1
vote
2 answers

Multiple associations with rails Audited

I am using the Audited gem for Rails, and am using the associated audits like so: audited allow_mass_assignment: true, associated_with: :protocol The problem is, I need this particular model's audits to be associated with more than one models. I…
DannyB
  • 12,810
  • 5
  • 55
  • 65
1
vote
1 answer

Removing relations is not being audited by audited gem

I'm using Associated Audits on a has_many through relation with Collective Idea's audited gem. I see create audits for the through model being added, but I do not see any audits when that relation is removed. Here are my 3 models. A Post can be in…
James Chevalier
  • 10,604
  • 5
  • 48
  • 74