mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Avoid creating an extra Range instance
This commit is contained in:
parent
54d893f9d8
commit
956671831d
1 changed files with 1 additions and 1 deletions
|
@ -281,7 +281,7 @@ module ActiveRecord
|
|||
value = read_attribute(attr_name)
|
||||
|
||||
if value.is_a?(String) && value.length > 50
|
||||
"#{value[0..49]}...".inspect
|
||||
"#{value[0, 50]}...".inspect
|
||||
elsif value.is_a?(Date) || value.is_a?(Time)
|
||||
%("#{value.to_s(:db)}")
|
||||
else
|
||||
|
|
Loading…
Reference in a new issue