diff --git a/lib/paper_trail/record_trail.rb b/lib/paper_trail/record_trail.rb index 0cf90146..e4bf5477 100644 --- a/lib/paper_trail/record_trail.rb +++ b/lib/paper_trail/record_trail.rb @@ -69,6 +69,13 @@ def record_create end end + # Returns the original version of this object or just this object if there has been no changes. + # + # @api public + def reify_original + versions.second&.reify || @record + end + # `recording_order` is "after" or "before". See ModelConfig#on_destroy. # # @api private