Sha256: c9e7111de95089a35386b6fb5fe91ccf53cc25de7785dfbdc61e1aa1ae444ff4
Contents?: true
Size: 425 Bytes
Versions: 8
Compression:
Stored size: 425 Bytes
Contents
class Money < ActiveRecord::Base belongs_to :currency before_save :parse_currency_code attr_accessor :currency_code private def parse_currency_code unless currency_code.blank? case currency_code.downcase # Check for all iso currency types we support when "usd" then self.currency = Currency.usd # add additional currency types end end end end
Version data entries
8 entries across 8 versions & 1 rubygems