Fix reify method

Handle case old version has attribute with same name with current model setter
This commit is contained in:
Vinh Bachsy 2014-09-29 14:24:46 +07:00
parent 8ce602cb78
commit 091b78e1d0
1 changed files with 1 additions and 1 deletions

View File

@ -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})."