Skip to content

Commit c51aee5

Browse files
authored
Merge pull request #889 from owenr/record_trail_log_version_errors_bug
BUGFIX: Log version validation errors with ID from record
2 parents e4dea2b + 6f9fa1e commit c51aee5

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

lib/paper_trail/record_trail.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -421,7 +421,8 @@ def habtm_assoc_ids(habtm_assoc)
421421

422422
def log_version_errors(version, action)
423423
version.logger.warn(
424-
"Unable to create version for #{action} of #{@record.class.name}##{id}: " +
424+
"Unable to create version for #{action} of #{@record.class.name}#" +
425+
"#{@record.id}: " +
425426
version.errors.full_messages.join(", ")
426427
)
427428
end

0 commit comments

Comments
 (0)