inspect()
public
Returns a string like ‘Post(id:integer,
title:string, body:text)’
# File activerecord/lib/active_record/core.rb, line 363
def inspect # :nodoc:
if self == Base || singleton_class?
super
elsif abstract_class?
"#{super}(abstract)"
elsif !schema_loaded? && !connected?
"#{super} (call '#{super}.load_schema' to load schema informations)"
elsif table_exists?
attr_list = attribute_types.map { |name, type| "#{name}: #{type.type}" } * ", "
"#{super}(#{attr_list})"
else
"#{super}(Table doesn't exist)"
end
end