aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/lib/active_record/persistence.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activerecord/lib/active_record/persistence.rb')
-rw-r--r--activerecord/lib/active_record/persistence.rb4
1 files changed, 2 insertions, 2 deletions
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