osem-fcy/app/controllers/physical_ticket_controller.rb
siddhantbajaj b9a540f4e2 Sample prototype for ticket pdf
Added verticl layout of ticket pdf without QR code.
2017-07-05 16:39:31 +05:30

15 lines
453 B
Ruby

class PhysicalTicketController < ApplicationController
before_action :authenticate_user!
load_resource :conference, find_by: :short_title
load_and_authorize_resource
authorize_resource :conference_registrations, class: Registration
def index
@physical_tickets = current_user.physical_tickets.by_conference(@conference)
end
def show
@file_name = "ticket_for_#{@conference.short_title}"
@user = @physical_ticket.user
end
end