app/models/ticket/transfers.rb in artfully_ose-1.2.0.pre.15 vs app/models/ticket/transfers.rb in artfully_ose-1.2.0.pre.16

- old
+ new

@@ -3,10 +3,11 @@ def sell_to(buyer, time=Time.now) begin self.buyer = buyer self.sold_at = time + generate_qr_code self.sell! rescue Transitions::InvalidTransition return false end end @@ -16,10 +17,11 @@ # def exchange_to(buyer, time=Time.now) begin self.buyer = buyer self.sold_at = time + generate_qr_code self.exchange! rescue Transitions::InvalidTransition => e puts e return false end @@ -28,10 +30,11 @@ def comp_to(buyer, time=Time.now) begin self.buyer = buyer self.sold_price = 0 self.sold_at = time + generate_qr_code self.comp! rescue Transitions::InvalidTransition => e puts e return false end @@ -41,11 +44,12 @@ and_return_to_inventory ? return_to_inventory! : return_off_sale! remove_from_cart self.buyer = nil self.sold_at = nil self.buyer_id = nil + self.qr_code = nil Rails.logger.debug(self.inspect) self.reset_price! save end -end \ No newline at end of file +end