OpenProject is the leading open source project management software.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
openproject/config/initializers/paper_trail.rb

17 lines
412 B

PaperTrail.config.enabled = true # PT will be disabled by rspec
PaperTrail.config.has_paper_trail_defaults = {
versions: {
class_name: '::PaperTrailAudit',
name: :paper_trail_audits
},
version: :paper_trail_audit,
meta: {
whodunnit: ->(*) { User.current.id },
stack: ->(*) {
backtrace = Rails.backtrace_cleaner.clean caller
backtrace.join("\n")
}
},
on: %i[destroy]
}