Pastie now auto-senses if line-wrap is a bad or good idea. Feedback?
## mark a section (Learn more)
class Sale < ActiveRecord::Base def validate_on_create ... amount_to_auth = self.total_price - self.voucher_total self.payment_transaction = self.payment_method.authorize(amount_to_auth) if amount_to_auth > 0 ... rescue PaymentMethodError => error errors.add_to_base(error.message) return false end end
This paste will be private.
From the Design Piracy series on my blog: