简体   繁体   English

审核的gem,不使用current_user

[英]Audited gem without using current_user

I am using 'audited' gem changes in model. 我在模型中使用“经过审核”的宝石更改。 I do have current_user in my app, but I don't to use it. 我的应用程序中确实有current_user,但我不使用它。 In fact, I don't want to user track, I just want the changes to be tracked, irrespective who does it. 实际上,我不想跟踪用户,我只想跟踪更改,而不管是谁做的。 How can I disable current user tracking? 如何禁用当前用户跟踪? I tried Audited.current_user_method = :nil , doesn't work. 我尝试了Audited.current_user_method = :nil ,不起作用。

Im using like this: 我使用这样的:
create a file into Audited.current_user_method = :nil to ./config/initializers/audited.rb 创建一个文件到Audited.current_user_method = :nil到./config/initializers/audited.rb
when Rails launch Rails启动时

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM