Sha256: 5a3f866010bbd953e89c57f8070e69f8e0de4f12b10973a5ec9a1250c399b7de

Contents?: true

Size: 450 Bytes

Versions: 23

Compression:

Stored size: 450 Bytes

Contents

module Bankserv
  
  class BankAccount < ActiveRecord::Base

    def account_holder
      account_name[0..29]
    end
    
    def account_type_id
      if self.account_type.to_i != 0
        self.account_type.to_s
      else
        { "cheque" => "1", 
        "current" => "1",
        "savings" => "2",
        "transmission" => "3",
        "bond" => "4",
        "subscription" => "6" }[self.account_type.downcase]
      end
    end
  end
  
end

Version data entries

23 entries across 23 versions & 1 rubygems

Version Path
bankserv-0.8.6 lib/bankserv/bank_account.rb
bankserv-0.8.5 lib/bankserv/bank_account.rb
bankserv-0.8.4 lib/bankserv/bank_account.rb
bankserv-0.8.2 lib/bankserv/bank_account.rb
bankserv-0.8.1 lib/bankserv/bank_account.rb
bankserv-0.8.0 lib/bankserv/bank_account.rb
bankserv-0.7.9 lib/bankserv/bank_account.rb
bankserv-0.7.8 lib/bankserv/bank_account.rb
bankserv-0.7.7 lib/bankserv/bank_account.rb
bankserv-0.7.6 lib/bankserv/bank_account.rb
bankserv-0.7.5 lib/bankserv/bank_account.rb
bankserv-0.7.4 lib/bankserv/bank_account.rb
bankserv-0.7.3 lib/bankserv/bank_account.rb
bankserv-0.7.2 lib/bankserv/bank_account.rb
bankserv-0.7.1 lib/bankserv/bank_account.rb
bankserv-0.7.0 lib/bankserv/bank_account.rb
bankserv-0.6.9 lib/bankserv/bank_account.rb
bankserv-0.6.8 lib/bankserv/bank_account.rb
bankserv-0.6.7 lib/bankserv/bank_account.rb
bankserv-0.6.6 lib/bankserv/bank_account.rb