# First, set up a customer_create method. This tells us how to create the # customer in your persistence layer. IsotopeSubscriptions.customer_create = lambda do |hash| customer = Customer.new(hash) if customer.save customer else false end end # Next, set up a customer_find method. This tells us how to find the # customer in your persistence layer. IsotopeSubscriptions.customer_find = lambda do |id| Customer.find params[:id] end
Create a gist now
Instantly share code, notes, and snippets.