Update syntax and CHANGELOG for #905 [ci skip]

This commit is contained in:
Ben Atkins 2016-12-05 18:21:15 -05:00
parent 5d37867e37
commit 1826eb30b4
2 changed files with 4 additions and 3 deletions

View File

@ -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)

View File

@ -502,10 +502,10 @@ module PaperTrail
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.