Format attributes nicely for inspect.
Source Code
# File active_record/base.rb, line 2152 def attribute_for_inspect(attr_name) value = read_attribute(attr_name) 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
<code/>and<pre/>for code samples.