Sha256: 6010caec9916ad51a302c69328e9519dbcf2a2f8fa71e3f13f190e41c1d9d702
Contents?: true
Size: 160 Bytes
Versions: 47
Compression:
Stored size: 160 Bytes
Contents
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
47 entries across 47 versions & 8 rubygems