From eb2ebe76807fadace0799019bb830cba0e12f64b Mon Sep 17 00:00:00 2001 From: Santiago Pastorino Date: Tue, 28 Dec 2010 00:49:34 -0200 Subject: [PATCH] Simplify inspect implementation After 304d38c0536dc32a8a1595ba34370ebf69a0d50d we don't need the new_record? check anymore. --- activerecord/lib/active_record/base.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/activerecord/lib/active_record/base.rb b/activerecord/lib/active_record/base.rb index f96aa8b3fb3..396ab226a9b 100644 --- a/activerecord/lib/active_record/base.rb +++ b/activerecord/lib/active_record/base.rb @@ -1630,7 +1630,7 @@ MSG # Returns the contents of the record as a nicely formatted string. def inspect attributes_as_nice_string = self.class.column_names.collect { |name| - if has_attribute?(name) || new_record? + if has_attribute?(name) "#{name}: #{attribute_for_inspect(name)}" end }.compact.join(", ")