Module: ErpTxnsAndAccts::Extensions::ActiveRecord::ActsAsBizTxnAccount::InstanceMethods
- Defined in:
- lib/erp_txns_and_accts/extensions/active_record/acts_as_biz_txn_account.rb
Instance Method Summary collapse
- #account_root ⇒ Object
- #destroy_biz_txn_account ⇒ Object
- #initialize_biz_txn_account ⇒ Object
- #save_biz_txn_account ⇒ Object
Instance Method Details
#account_root ⇒ Object
39 40 41 |
# File 'lib/erp_txns_and_accts/extensions/active_record/acts_as_biz_txn_account.rb', line 39 def account_root biz_txn_acct_root end |
#destroy_biz_txn_account ⇒ Object
55 56 57 |
# File 'lib/erp_txns_and_accts/extensions/active_record/acts_as_biz_txn_account.rb', line 55 def destroy_biz_txn_account self.biz_txn_acct_root.destroy if (self.biz_txn_acct_root && !self.biz_txn_acct_root.frozen?) end |
#initialize_biz_txn_account ⇒ Object
43 44 45 46 47 48 49 |
# File 'lib/erp_txns_and_accts/extensions/active_record/acts_as_biz_txn_account.rb', line 43 def initialize_biz_txn_account if self.new_record? and self.biz_txn_acct_root.nil? t = BizTxnAcctRoot.new self.biz_txn_acct_root = t t.biz_txn_acct = self end end |
#save_biz_txn_account ⇒ Object
51 52 53 |
# File 'lib/erp_txns_and_accts/extensions/active_record/acts_as_biz_txn_account.rb', line 51 def save_biz_txn_account self.biz_txn_acct_root.save end |