Returns the contents of the record as a nicely formatted string.
# File activerecord/lib/active_record/core.rb, line 348
def inspect
# We check defined?(@attributes) not to issue warnings if the object is
# allocated but not initialized.
inspection = if defined?(@attributes) && @attributes
self.class.column_names.collect { |name|
if has_attribute?(name)
"#{name}: #{attribute_for_inspect(name)}"
end
}.compact.join(", ")
else
"not initialized"
end
"#<#{self.class} #{inspection}>"
end