2017-10-22 23:24:28 +03:00
|
|
|
class Public::EventFeedbackQrcodesController < Public::ApplicationController
|
|
|
|
def show
|
|
|
|
event = current_conference.events.joins(:proposition).approved.find(params[:event_id])
|
|
|
|
@qr = RQRCode::QRCode.new(new_event_feedback_url(event_id: event.id), level: :l)
|
|
|
|
|
|
|
|
respond_to do |format|
|
|
|
|
format.svg do
|
2019-04-28 21:10:54 +03:00
|
|
|
render(inline: @qr.as_svg(shape_rendering: "crispEdges", module_size: 11, fill: "ffffff", offset: 10),
|
2017-10-22 23:24:28 +03:00
|
|
|
filename: "feedback_qr_code_#{event.id}.svg")
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|