From 0086ee201b40a1127cad5ab63f9e2a52baf5894e Mon Sep 17 00:00:00 2001 From: Ben Atkins Date: Sat, 26 Nov 2016 00:04:19 -0500 Subject: [PATCH] Update CHANGELOG regarding #889 --- CHANGELOG.md | 2 ++ lib/paper_trail/record_trail.rb | 5 ++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 650cfb58..a4475431 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -24,6 +24,8 @@ recommendations of [keepachangelog.com](http://keepachangelog.com/). ### Fixed +- [#889](https://github.com/airblade/paper_trail/pull/889) - + Fix warning message in instances when a version can't be persisted due to validation errors. - [#868](https://github.com/airblade/paper_trail/pull/868) - Fix usage of find_by_id when primary key is not id, affecting reifying certain records. diff --git a/lib/paper_trail/record_trail.rb b/lib/paper_trail/record_trail.rb index aa074171..2aa339c0 100644 --- a/lib/paper_trail/record_trail.rb +++ b/lib/paper_trail/record_trail.rb @@ -421,9 +421,8 @@ module PaperTrail def log_version_errors(version, action) version.logger.warn( - "Unable to create version for #{action} of #{@record.class.name}#" + - "#{@record.id}: " + - version.errors.full_messages.join(", ") + "Unable to create version for #{action} of #{@record.class.name}" + + "##{@record.id}: " + version.errors.full_messages.join(", ") ) end