1
0
Fork 0
mirror of https://github.com/rails/rails.git synced 2022-11-09 12:12:34 -05:00

Provide a more truthful #inspect

This is obviously all very internal, but sometimes you have to look at
it... and when you do, it'll save a lot of confusion if it doesn't lie
about its identity.
This commit is contained in:
Matthew Draper 2015-03-23 15:10:04 +10:30
parent 8b96c0b7a3
commit 5d6500535c

View file

@ -26,6 +26,10 @@ module ActiveRecord
end
end
def inspect
Kernel.instance_method(:inspect).bind(self).call
end
def changed_in_place?(raw_old_value, value)
return false if value.nil?
raw_new_value = serialize(value)