mirror of
https://github.com/github/rails.git
synced 2026-04-26 03:00:59 -04:00
Simplify inspect implementation
After 304d38c053 we don't need the
new_record? check anymore.
This commit is contained in:
@@ -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(", ")
|
||||
|
||||
Reference in New Issue
Block a user