mirror of
https://github.com/paper-trail-gem/paper_trail.git
synced 2022-11-09 11:33:19 -05:00
Fix reify method
Handle case old version has attribute with same name with current model setter
This commit is contained in:
parent
8ce602cb78
commit
091b78e1d0
1 changed files with 1 additions and 1 deletions
|
@ -149,7 +149,7 @@ module PaperTrail
|
|||
|
||||
# Set all the attributes in this version on the model
|
||||
attrs.each do |k, v|
|
||||
if model.respond_to?("#{k}=")
|
||||
if model.has_attribute?(k)
|
||||
model[k.to_sym] = v
|
||||
else
|
||||
logger.warn "Attribute #{k} does not exist on #{item_type} (Version id: #{id})."
|
||||
|
|
Loading…
Reference in a new issue