Update syntax and CHANGELOG for #905 [ci skip]
This commit is contained in:
parent
5d37867e37
commit
1826eb30b4
|
@ -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 @@ 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.
|
||||
|
|
Loading…
Reference in New Issue