From d79e99a0758bd63e3747ee8586d3630036e16831 Mon Sep 17 00:00:00 2001 From: Ryuta Kamizono Date: Mon, 4 Jul 2016 02:40:16 +0900 Subject: Use `squish` rather than `strip_heredoc` --- activerecord/lib/active_record/persistence.rb | 4 ++-- activerecord/lib/active_record/touch_later.rb | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'activerecord/lib') diff --git a/activerecord/lib/active_record/persistence.rb b/activerecord/lib/active_record/persistence.rb index ebdb9efba2..510e8a6e43 100644 --- a/activerecord/lib/active_record/persistence.rb +++ b/activerecord/lib/active_record/persistence.rb @@ -480,10 +480,10 @@ module ActiveRecord # def touch(*names, time: nil) unless persisted? - raise ActiveRecordError, <<-end_error.strip_heredoc + raise ActiveRecordError, <<-MSG.squish cannot touch on a new or destroyed record object. Consider using persisted?, new_record?, or destroyed? before touching - end_error + MSG end time ||= current_time_from_proper_timezone diff --git a/activerecord/lib/active_record/touch_later.rb b/activerecord/lib/active_record/touch_later.rb index 5c41ab6e39..598873ea3a 100644 --- a/activerecord/lib/active_record/touch_later.rb +++ b/activerecord/lib/active_record/touch_later.rb @@ -9,10 +9,10 @@ module ActiveRecord def touch_later(*names) # :nodoc: unless persisted? - raise ActiveRecordError, <<-end_error.strip_heredoc + raise ActiveRecordError, <<-MSG.squish cannot touch on a new or destroyed record object. Consider using persisted?, new_record?, or destroyed? before touching - end_error + MSG end @_defer_touch_attrs ||= timestamp_attributes_for_update_in_model -- cgit v1.2.3