osem-fcy/app/controllers/physical_ticket_controller.rb
siddhantbajaj a327d2cbd2 Ticket Purchase Index Page
List all the unpaid ticket purchases of the user for that conference and allow user to pay for them.
2017-07-06 02:46:53 +05:30

13 lines
456 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)
@unpaid_ticket_purchases = current_user.ticket_purchases.by_conference(@conference).unpaid
end
def show; end
end