Permalink
Browse files

Update syntax and CHANGELOG for #905 [ci skip]

  • Loading branch information...
1 parent 5d37867 commit 1826eb30b48ad109f530a3c326fe0d962113c20b @batter batter committed Dec 5, 2016
Showing with 4 additions and 3 deletions.
  1. +2 −1 CHANGELOG.md
  2. +2 −2 lib/paper_trail/record_trail.rb
View
@@ -15,7 +15,8 @@ recommendations of [keepachangelog.com](http://keepachangelog.com/).
### Fixed
-- None
+- [#905](https://github.com/airblade/paper_trail/pull/905) - Only invoke
+ `logger.warn` if `logger` instance exists
## 6.0.1 (2016-12-04)
@@ -502,10 +502,10 @@ def habtm_assoc_ids(habtm_assoc)
end
def log_version_errors(version, action)
- version.logger.warn(
+ version.logger && version.logger.warn(
"Unable to create version for #{action} of #{@record.class.name}" +
"##{@record.id}: " + version.errors.full_messages.join(", ")
- ) if version.logger
+ )
end
# Returns true if the given HABTM association should be saved.

0 comments on commit 1826eb3

Please sign in to comment.