Sha256: a30803c73d3c955ac026aa0e2774e2f07c4ca26b2150fdbed96115fb123f3c94
Contents?: true
Size: 609 Bytes
Versions: 8
Compression:
Stored size: 609 Bytes
Contents
class AddCalculateBalanceStrategyTypes def self.up [ ['Calculate with invoices and payments', 'invoices_and_payments'], ['Calculate with payments', 'payments'], ['Calculate with invoices items and payments', 'invoice_items_and_payments'] ].each do |item| CalculateBalanceStrategyType.create(:description => item[0], :internal_identifier => item[1]) end end def self.down ['invoices_and_payments','payments', 'invoice_items_and_payments'].each do |iid| CalculateBalanceStrategyType.destroy_all("internal_identifier = #{iid}") end end end
Version data entries
8 entries across 8 versions & 1 rubygems