Files
mozo-backend/app/controllers/dashboard_controller.rb
T
2012-11-14 15:12:28 +01:00

50 lines
1013 B
Ruby

class DashboardController < ApplicationController
layout 'theme1'
def home
render layout: 'theme1-home'
end
def contact
end
def bars_restaurants
end
def clients
end
def demo_both
render layout: 'twitter-bootstrap'
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, qcontainer: true }
format.png { render qrcode: code, table_number: @table.number, qcontainer: true }
end
end
def qr
code = 'qwaiter.com'
respond_to do |format|
format.html
format.svg { render :qrcode => code, :level => :l, :unit => 10}
format.png { render qrcode: code}
end
end
end