class Numeric def commify to_s.gsub(/(\d)(?=\d{3}+(\.\d*)?$)/, '\1,') end end