Moved order stats and cleanup stuff into rake task.

Closes #14
This commit is contained in:
Benjamin Meichsner 2010-02-09 21:45:57 +01:00
parent a6646d06a6
commit 55d2976e98
3 changed files with 30 additions and 26 deletions

View file

@ -95,7 +95,7 @@ class OrdersController < ApplicationController
def finish
order = Order.find(params[:id])
order.finish!(@current_user)
call_rake "foodsoft:notify_order_finished", :order_id => order.id
call_rake "foodsoft:finished_order_tasks", :order_id => order.id
flash[:notice] = "Die Bestellung wurde beendet."
redirect_to order
end