Pastie now auto-senses if line-wrap is a bad or good idea. Feedback?
## mark a section (Learn more)
class Shipment < ActiveRecord::Base after_create :credit_affiliate def credit_affiliate if self.affiliate self.affiliate_credits.create(:account => self.affiliate, :amount => (self.total * self.affiliate.percentage(self.id)).round) end end end
This paste will be private.
From the Design Piracy series on my blog: