簡體   English   中英

審核的gem,不使用current_user

[英]Audited gem without using current_user

我在模型中使用“經過審核”的寶石更改。 我的應用程序中確實有current_user,但我不使用它。 實際上,我不想跟蹤用戶,我只想跟蹤更改,而不管是誰做的。 如何禁用當前用戶跟蹤? 我嘗試了Audited.current_user_method = :nil ,不起作用。

我使用這樣的:
創建一個文件到Audited.current_user_method = :nil到./config/initializers/audited.rb
Rails啟動時

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM