app/models/user.rb
# 4) balance. Balance. Required. Multi-currency Hash in model. Encrypted text in db
# Keys is ISO code for currency USD, EUR, GBP etc.
# Key BALANCE is sum of all currencies exchanged to users actual currency
# validates_presence_of :balance # todo: only required for gofreerev users / not required for friends not using gofreerev
4) balance. Balance. Required. Multi-currency Hash in model. Encrypted text in db
Keys is ISO code for currency USD, EUR, GBP etc.
Key BALANCE is sum of all currencies exchanged to users actual currency
validates_presence_of :balance # todo: only required for gofreerev users / not required for friends not using gofreerev
4 ) balance . Balance . Required . Multi - currency Hash in model . Encrypted text in db Keys is ISO code for currency USD EUR GBP etc . Key BALANCE is sum of all currencies exchanged to users actual currency validates_presence_of : balance # todo : only required for gofreerev users / not required for friends not using gofreerev
def balance
    return nil unless (temp_extended_balance = read_attribute(:balance))
    temp_balance = YAML::load encrypt_remove_pre_and_postfix(temp_extended_balance, 'balance', 11)
    temp_balance[BALANCE_KEY] = nil unless temp_balance.has_key?(BALANCE_KEY)
    temp_balance
  end
def balance return nil unless ( temp_extended_balance = read_attribute ( :balance ) ) temp_balance = YAML :: load encrypt_remove_pre_and_postfix ( temp_extended_balance , 'balance' , 11 ) temp_balance [ BALANCE_KEY ] = nil unless temp_balance . has_key? ( BALANCE_KEY ) temp_balance end
4) balance.
4 ) balance .
# logger.debug2  "temp_extended_balance = #{temp_extended_balance}"