Sha256: 19fbc9e0ffe39ba93fad93c5eb941aaad9a1c1adf444c660a043ffeb01fb7603
Contents?: true
Size: 189 Bytes
Versions: 6
Compression:
Stored size: 189 Bytes
Contents
# 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 } end
Version data entries
6 entries across 6 versions & 2 rubygems