Sha256: 06d7c2bb3e473fc14421c525f90695c6abeb292356fc69e34b415200687f3a51
Contents?: true
Size: 195 Bytes
Versions: 4
Compression:
Stored size: 195 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
4 entries across 4 versions & 1 rubygems