Module: ErpTxnsAndAccts::Extensions::ActiveRecord::ActsAsFinancialTxnAccount::InstanceMethods
- Defined in:
- lib/erp_txns_and_accts/extensions/active_record/acts_as_financial_txn_account.rb
Instance Method Summary collapse
- #destroy_financial_txn_account ⇒ Object
- #initialize_financial_txn_account ⇒ Object
- #save_financial_txn_account ⇒ Object
Instance Method Details
#destroy_financial_txn_account ⇒ Object
63 64 65 |
# File 'lib/erp_txns_and_accts/extensions/active_record/acts_as_financial_txn_account.rb', line 63 def destroy_financial_txn_account self.financial_txn_account.destroy if (self.financial_txn_account && !self.financial_txn_account.frozen?) end |
#initialize_financial_txn_account ⇒ Object
51 52 53 54 55 56 57 |
# File 'lib/erp_txns_and_accts/extensions/active_record/acts_as_financial_txn_account.rb', line 51 def initialize_financial_txn_account if self.new_record? and self.financial_txn_account.nil? f = FinancialTxnAccount.new self.financial_txn_account = f f.financial_account = self end end |
#save_financial_txn_account ⇒ Object
59 60 61 |
# File 'lib/erp_txns_and_accts/extensions/active_record/acts_as_financial_txn_account.rb', line 59 def save_financial_txn_account self.financial_txn_account.save end |