Implement waiter ordering and improvements

This commit is contained in:
2014-03-24 10:02:57 +01:00
parent 474d5f88c6
commit 6c2427e082
24 changed files with 128 additions and 48 deletions
+2 -2
View File
@@ -286,12 +286,12 @@ class UserController < ApplicationController
respond_to do |format|
format.html do
redirect_to(user_root_path, alert: t('messages.cannot_order_on_non_active_list')) and return unless @list.active?
@list.place_order current_user, params[:products]
@list.place_order params[:products], user: current_user
redirect_to user_root_path, notice: t('messages.order_is_placed')
end
format.json do
render json: json_alert('messages.cannot_order_on_non_active_list') and return unless @list.active?
@list.place_order current_user, params[:products]
@list.place_order params[:products], user: current_user
render json: json_notice('messages.order_is_placed', location: :active_list)
end
end