Refactored order finishing. Delay user notifications.

This commit is contained in:
benni 2012-08-24 14:24:36 +02:00
parent b0c9580b53
commit af3875d46b
4 changed files with 38 additions and 42 deletions

View file

@ -97,9 +97,7 @@ class OrdersController < ApplicationController
def finish
order = Order.find(params[:id])
order.finish!(@current_user)
call_rake "foodsoft:finished_order_tasks", :order_id => order.id
flash[:notice] = "Die Bestellung wurde beendet."
redirect_to order
redirect_to order, notice: "Die Bestellung wurde beendet."
end
# Renders the groups-orderd PDF.