method
format_for_inspect
v6.0.0 -
Show latest stable
- Class:
ActiveRecord::AttributeMethods
format_for_inspect(value)private
No documentation available.
# File activerecord/lib/active_record/attribute_methods.rb, line 402
def format_for_inspect(value)
if value.is_a?(String) && value.length > 50
"#{value[0, 50]}...".inspect
elsif value.is_a?(Date) || value.is_a?(Time)
%("#{value.to_s(:db)}")
else
value.inspect
end
end