File: document.rb

package info (click to toggle)
ruby-paper-trail 12.0.0-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 1,200 kB
  • sloc: ruby: 6,743; makefile: 6
file content (10 lines) | stat: -rw-r--r-- 314 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
# frozen_string_literal: true

# Demonstrates a "custom versions association name". Instead of the association
# being named `versions`, it will be named `paper_trail_versions`.
class Document < ActiveRecord::Base
  has_paper_trail(
    versions: { name: :paper_trail_versions },
    on: %i[create update]
  )
end