Merge pull request #769 from john-denisov/patch-1

Take private/protected methods into consideration
This commit is contained in:
Ben Atkins 2016-04-07 11:27:47 -04:00
commit 830d48a985
1 changed files with 1 additions and 1 deletions

View File

@ -469,7 +469,7 @@ module PaperTrail
data[k] =
if v.respond_to?(:call)
v.call(self)
elsif v.is_a?(Symbol) && respond_to?(v)
elsif v.is_a?(Symbol) && respond_to?(v, true)
# If it is an attribute that is changing in an existing object,
# be sure to grab the current version.
if has_attribute?(v) && send("#{v}_changed?".to_sym) && data[:event] != "create"