【发布时间】:2016-05-12 01:14:47
【问题描述】:
是否有一个选项可以为某个版本配置 item_type?我有一个 Post 类,默认 item_type 是 Post;有没有配置Foo的选项?
更新示例:
class Post < ActiveRecord::Base
has_paper_trail
end
post = Post.create # this creates a new post along with a version.
version = post.versions.first
version.item_type = 'Post' # Item type here is the name of the base model 'Post'.
【问题讨论】:
-
我更新了标题和帖子。这是为了纸迹宝石。
标签: ruby paper-trail-gem