Slide 51
Slide 51 text
class Purchase < ActiveRecord::Base; end
def self.create_for_buyer(buyer, photo)
purchase = self.create!(buyer, photo)
BuyerMailer.send_invoice(buyer, purchase)
photo.increment_sales_count
buyer.enable_review_of(photo)
end
end
> Purchase.instance_methods.size -
Object.instance_methods.size
=> 214