Browse files

Simplify inspect implementation

After 304d38c we don't need the
new_record? check anymore.
  • Loading branch information...
1 parent 304d38c commit eb2ebe76807fadace0799019bb830cba0e12f64b @spastorino spastorino committed Dec 28, 2010
Showing with 1 addition and 1 deletion.
  1. +1 −1 activerecord/lib/active_record/base.rb
View
2 activerecord/lib/active_record/base.rb
@@ -1630,7 +1630,7 @@ def readonly!
# 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(", ")

0 comments on commit eb2ebe7

Please sign in to comment.