提交 d79e99a0 编写于 作者: R Ryuta Kamizono

Use `squish` rather than `strip_heredoc`

上级 ee50de03
...@@ -480,10 +480,10 @@ def reload(options = nil) ...@@ -480,10 +480,10 @@ def reload(options = nil)
# #
def touch(*names, time: nil) def touch(*names, time: nil)
unless persisted? unless persisted?
raise ActiveRecordError, <<-end_error.strip_heredoc raise ActiveRecordError, <<-MSG.squish
cannot touch on a new or destroyed record object. Consider using cannot touch on a new or destroyed record object. Consider using
persisted?, new_record?, or destroyed? before touching persisted?, new_record?, or destroyed? before touching
end_error MSG
end end
time ||= current_time_from_proper_timezone time ||= current_time_from_proper_timezone
......
...@@ -9,10 +9,10 @@ module TouchLater ...@@ -9,10 +9,10 @@ module TouchLater
def touch_later(*names) # :nodoc: def touch_later(*names) # :nodoc:
unless persisted? unless persisted?
raise ActiveRecordError, <<-end_error.strip_heredoc raise ActiveRecordError, <<-MSG.squish
cannot touch on a new or destroyed record object. Consider using cannot touch on a new or destroyed record object. Consider using
persisted?, new_record?, or destroyed? before touching persisted?, new_record?, or destroyed? before touching
end_error MSG
end end
@_defer_touch_attrs ||= timestamp_attributes_for_update_in_model @_defer_touch_attrs ||= timestamp_attributes_for_update_in_model
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册