app/models/esa/chart.rb in event_sourced_accounting-0.1.0 vs app/models/esa/chart.rb in event_sourced_accounting-0.1.1

- old
+ new

@@ -1,20 +1,23 @@ +require 'esa/associations/amounts_extension' +require 'esa/traits/extendable' + module ESA # The Chart class represents an organized set of accounts in the system. # # @author Lenno Nagel class Chart < ActiveRecord::Base - include Traits::Extendable + include ESA::Traits::Extendable attr_accessible :name has_many :accounts has_many :rulesets has_many :events, :through => :rulesets, :uniq => true has_many :flags, :through => :rulesets, :uniq => true has_many :transactions, :through => :accounts, :uniq => true - has_many :amounts, :through => :accounts, :uniq => true, :extend => Associations::AmountsExtension + has_many :amounts, :through => :accounts, :uniq => true, :extend => ESA::Associations::AmountsExtension after_initialize :default_values validates_presence_of :name validates_uniqueness_of :name