Merge pull request #769 from john-denisov/patch-1
Take private/protected methods into consideration
This commit is contained in:
commit
830d48a985
|
@ -469,7 +469,7 @@ module PaperTrail
|
||||||
data[k] =
|
data[k] =
|
||||||
if v.respond_to?(:call)
|
if v.respond_to?(:call)
|
||||||
v.call(self)
|
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,
|
# If it is an attribute that is changing in an existing object,
|
||||||
# be sure to grab the current version.
|
# be sure to grab the current version.
|
||||||
if has_attribute?(v) && send("#{v}_changed?".to_sym) && data[:event] != "create"
|
if has_attribute?(v) && send("#{v}_changed?".to_sym) && data[:event] != "create"
|
||||||
|
|
Loading…
Reference in New Issue