Sha256: 6335bdca5794529a9145408cfc0ee8602c516b694e080a3aeba0a4dc954d85e7
Contents?: true
Size: 387 Bytes
Versions: 12
Compression:
Stored size: 387 Bytes
Contents
module MuckCommerce module OrderMethods def order_number return self.number if !self.number.nil? record = true while record random = Array.new(10){rand(10)}.join record = Order.find(:first, :conditions => ["number = ?", random]) end self.number = random end def dollar_amount self.amount * 0.01 end end end
Version data entries
12 entries across 12 versions & 1 rubygems