aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/models/invoice.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activerecord/test/models/invoice.rb')
-rw-r--r--activerecord/test/models/invoice.rb2
1 files changed, 2 insertions, 0 deletions
diff --git a/activerecord/test/models/invoice.rb b/activerecord/test/models/invoice.rb
index 4be5a00193..1851792ed5 100644
--- a/activerecord/test/models/invoice.rb
+++ b/activerecord/test/models/invoice.rb
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+
class Invoice < ActiveRecord::Base
has_many :line_items, autosave: true
before_save { |record| record.balance = record.line_items.map(&:amount).sum }