module ErpTxnsAndAccts::Extensions::ActiveRecord::ActsAsBizTxnAccount::ClassMethods

Public Instance Methods

acts_as_biz_txn_account() click to toggle source
# File lib/erp_txns_and_accts/extensions/active_record/acts_as_biz_txn_account.rb, line 11
def acts_as_biz_txn_account
  extend ActsAsBizTxnAccount::SingletonMethods
  include ActsAsBizTxnAccount::InstanceMethods

  after_initialize :initialize_biz_txn_account
  after_create :save_biz_txn_account
  after_update :save_biz_txn_account
  after_destroy :destroy_biz_txn_account

  has_one :biz_txn_acct_root, :as => :biz_txn_acct

  [
    :biz_txn_acct_type,
    :txn_account_type,:txn_account_type=,
    :biz_txn_events,
    :biz_txn_acct_party_roles,
    :txn_events,:add_party_with_role,
    :status,:status=,
    :external_id_source,:external_id_source=,
    :external_identifier,:external_identifier=,
    :description,:description=,:txns,
    :account_type,:find_parties_by_role
  ].each do |m| delegate m, :to => :biz_txn_acct_root end

end