CC data == liability • Solution: Pass the buck • Alternate solution: Encryption Or see http:/ / blog.leetsoft.com/ articles/2006/03/14/ simple-encryption for thoughts on handling the encryption yourself
:product_option_id => opt.id, :price => opt.price, :weight => opt.weight) end end def product_option_names self.product_options.collect(&:name).to_sentence end end Product Options
end end end Refund class LineItem < ActiveRecord::Base def total(include_options = true) (self.price * self.quantity) + self.tax + (include_options ? self.product_options.collect(&:price).sum : 0) end end