aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord
diff options
context:
space:
mode:
authorSantiago Pastorino <santiago@wyeworks.com>2010-12-28 00:49:34 -0200
committerSantiago Pastorino <santiago@wyeworks.com>2010-12-28 15:45:35 -0200
commiteb2ebe76807fadace0799019bb830cba0e12f64b (patch)
treec6b6414dd361667548c4bdb10188514eee1576c6 /activerecord
parent304d38c0536dc32a8a1595ba34370ebf69a0d50d (diff)
downloadrails-eb2ebe76807fadace0799019bb830cba0e12f64b.tar.gz
rails-eb2ebe76807fadace0799019bb830cba0e12f64b.tar.bz2
rails-eb2ebe76807fadace0799019bb830cba0e12f64b.zip
Simplify inspect implementation
After 304d38c0536dc32a8a1595ba34370ebf69a0d50d we don't need the new_record? check anymore.
Diffstat (limited to 'activerecord')
-rw-r--r--activerecord/lib/active_record/base.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activerecord/lib/active_record/base.rb b/activerecord/lib/active_record/base.rb
index f96aa8b3fb..396ab226a9 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(", ")