app/models/payments/comp_payment.rb in artfully_ose-1.2.0.pre.24 vs app/models/payments/comp_payment.rb in artfully_ose-1.2.0.pre.26
- old
+ new
@@ -7,10 +7,12 @@
#benefactor is the user that is doing the comping (current_user)
#person is the person record receiving the comp. It must have the id set
def initialize(params)
params = params.is_a?(Array) ? params[0] : params
self.benefactor = params[:benefactor]
- self.customer = params[:customer]
+ self.customer ||= Person.new
+ build_customer_from(params)
+ build_address_from(params)
end
def requires_authorization?
false
end
\ No newline at end of file