cirandas.net

commit ece1fda7ce7437d015b5e12bfae061121edca6e8

Author: Hugo Melo <hugo@riseup.net>

Fix destroy

%!v(PANIC=String method: strings: negative Repeat count)


diff --git a/plugins/orders/controllers/myprofile/orders_plugin_item_controller.rb b/plugins/orders/controllers/myprofile/orders_plugin_item_controller.rb
index 4761f3db9e3c161c539f572b8330ca5b4ce0aaa5..9426b9032e1aa9a7ecb3cae522366ff1df586d08 100644
--- a/plugins/orders/controllers/myprofile/orders_plugin_item_controller.rb
+++ b/plugins/orders/controllers/myprofile/orders_plugin_item_controller.rb
@@ -37,6 +37,7 @@
   def destroy
     item = OrdersPlugin::Item.where(id: params[:id]).first
     return unless item
+    @order = item.order
     @offered_product = item.offered_product
     item.destroy
   end