Files
mozo-backend/app/controllers/dashboard_controller.rb
T
2012-08-29 17:42:04 +02:00

30 lines
612 B
Ruby

class DashboardController < ApplicationController
def home
end
def demo_both
end
# Testing action
def select_qrcode
@tables = Table.all
render layout: 'phone'
end
# GET /select_qr_image
# GET /select_qr_image.png
# GET /select_qr_image.svg
def table_qr_image
@table = Table.find(params[:table_id])
code = {table_id: @table.id}.to_json
respond_to do |format|
format.html
format.svg { render :qrcode => code, :level => :l, :unit => 10, table_number: @table.number }
format.png { render qrcode: code, table_number: @table.number }
end
end
end