如何捕捉ActiveRecord的表审核历史记录 [英] How to capture audit history on ActiveRecord tables

查看:95
本文介绍了如何捕捉ActiveRecord的表审核历史记录的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想打开它发生在暴露的ActiveRecord 接口某些表的所有更改的审核历史记录。是否有任何宝石,可以启用此功能?

 创建表foo(ID,FIELD1,FIELD2,FIELD3 ...)
 

这应该可以在所有领域的过渡,要么在创建创建审核| updation。

 例如。场1的值1转换 - > value11
例如场2从数值2转变 - > value22
 

解决方案

红宝石工具箱是地方去的选择,这些都是您选择的ActiveRecord的审计宝石

I would like to turn on audit history of all changes which happens on certain tables exposed as ActiveRecord interfaces. Are there any gems which can enable this functionality?

create table foo (id, field1, field2, field3 ...)

It should be possible to create an audit on all field transitions either on creation | updation.

e.g. field 1  transitioned from value1 --> value11
e.g. field 2  transitioned from value2 --> value22

解决方案

Ruby Toolbox is the place to go for the choices and these are your choices for ActiveRecord audit gems

这篇关于如何捕捉ActiveRecord的表审核历史记录的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆