Files
mozo-backend/app/controllers/dashboard_controller.rb
T
2012-08-22 18:15:37 +02:00

31 lines
525 B
Ruby

class DashboardController < ApplicationController
def home
end
# Testing action
def select_qrcode
@tables = Table.all
end
def create_list
@table = Table.find(params[:table_id])
if @table.occupied?
redirect_to root_path, alert: t('table.is_occupied')
else
@list = List.new(table: @table)
#@list.add_user(current_user)
@list.save
session[:list_id] = @list.id
redirect_to root_path
end
end
def show_products
@supplier = Supplier.first
end
end