mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-13 19:54:02 +00:00
Added option for conference organizer to switch between ticket layouts (horizontal or vertical). Added test for the same.
17 lines
602 B
Ruby
17 lines
602 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
|
|
@file_name = "ticket_for_#{@conference.short_title}"
|
|
@user = @physical_ticket.user
|
|
@ticket_layout = @conference.ticket_layout.to_sym
|
|
end
|
|
end
|