Audited is an extension that logs all changes to Rails models

Audited is an extension that logs all changes to Rails models
Average rating: 3.6
(6 votes)

Thanks! You’ve rated this material!

Being experts in Rails is a hard path. You know too many great tools and solutions to choose from. But on the other hand, Rails experts like Syndicode are always ready to share some information about all these tools and solutions so you could know about them as well! Today we are going to present to you the new Rails extension. Audited is an extension that logs all changes to Rails models. Find out why you may want to use it for your projects.

Audited is a new ORM extension that can also record who made changes to Rails models, can save comments and associate models related to the changes. It is compatible with Rails 6.0, 5.2, 5.1, 5.0 and 4.2.

To install it add the gem to your Gemfile and create the audits table. You can use rails generate audited:install --audited-user-id-column-type uuid to customize the audits table user_id column type.

While using, updated or destroyed, a new audit is created. All of them contain information about actions that were taken on the model and changes applied. When an object is updated, extra audits are combined and the previous ones are destroyed.

You can find out more useful information about the use of that convenient extension here.

Rails getting more and more great updates and libraries. But considering this all you shouldn’t forget about Rails performance!

Btw, Syndicode could be a perfect choice for your next Rails app!

Rate this article, if you like it

Thanks! You’ve rated this material!

Got a project? Let's discuss it!

    Kyiv Sofiivska 1/2a, 01001, Kyiv, Ukraine
    Dnipro Hlinky 2, of. 1003, 49000, Dnipro, Ukraine
    Kharkiv Otakara Yarosha 22, 61000, Kharkiv, Ukraine