mirror of https://github.com/rails/rails
Simplify inspect implementation
After 304d38c053
we don't need the
new_record? check anymore.
This commit is contained in:
parent
304d38c053
commit
eb2ebe7680
|
@ -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(", ")
|
||||
|
|
Loading…
Reference in New Issue