Changed physical_ticket to plural
This commit is contained in:
parent
2247231d6e
commit
568d89b620
12 changed files with 10 additions and 10 deletions
|
|
@ -1,28 +0,0 @@
|
|||
class PhysicalTicketController < ApplicationController
|
||||
before_action :authenticate_user!
|
||||
load_resource :conference, find_by: :short_title
|
||||
load_and_authorize_resource find_by: :token
|
||||
authorize_resource :conference_registrations, class: Registration
|
||||
|
||||
def index
|
||||
@physical_tickets = current_user.physical_tickets.by_conference(@conference)
|
||||
@unpaid_ticket_purchases = current_user.ticket_purchases.by_conference(@conference).unpaid
|
||||
end
|
||||
|
||||
def show
|
||||
@file_name = "ticket_for_#{@conference.short_title}"
|
||||
@user = @physical_ticket.user
|
||||
@ticket_layout = @conference.ticket_layout.to_sym
|
||||
@qrcode_image = RQRCode::QRCode.new(@physical_ticket.token).as_png(size: 180, border_modules: 0)
|
||||
respond_to do |format|
|
||||
format.html
|
||||
format.pdf do
|
||||
pdf = TicketPdf.new(@conference, @user, @physical_ticket, @ticket_layout, @file_name)
|
||||
send_data pdf.render,
|
||||
filename: @file_name,
|
||||
type: 'application/pdf',
|
||||
disposition: 'attachment'
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue