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
|
@ -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 New Issue