开发者

Rails 3 - Devise with acts_as_audited possible?

开发者 https://www.devze.com 2023-03-30 23:27 出处:网络
I\'d like to use Devise with acts_as_audited. I have goo开发者_Python百科gled it, but the results weren\'t very clear.

I'd like to use Devise with acts_as_audited. I have goo开发者_Python百科gled it, but the results weren't very clear. What are its pros and cons?


I use Paper Trail here which is newer but much the same thing, and the top of my Devise User model looks like this:

class User < ActiveRecord::Base
    has_paper_trail

And now I have a growing versions table in my DB with a row for every CRUD action on the User model.

The benefits are that all previous versions of your model's data are saved and stored in YAML, allowing you to rollback/undo.

The cons? Only database size and perhaps a small performance hit at Write/Update time.

0

精彩评论

暂无评论...
验证码 换一张
取 消