Papertrail - Store each models version in a separate table

Updated . Posted . Visible to the public.

Store each models version in a separate table Show archive.org snapshot

class Post < ActiveRecord::Base
  has_paper_trail :class_name => 'PostVersion'
end

class PostVersion < Version
  # custom behaviour, e.g:
  set_table_name :post_versions
end
Profile picture of Martin Straub
Martin Straub
Last edit
License
Source code in this card is licensed under the MIT License.
Posted by Martin Straub to makandra dev (2014-03-11 08:12)