[refactor] Clean up unused code
This commit is contained in:
parent
189c2ec75f
commit
7d70462542
2 changed files with 3 additions and 8 deletions
|
|
@ -41,15 +41,15 @@ class TicketPurchasesController < ApplicationController
|
|||
if @conference.registration_ticket_required? && count_registration_tickets_after == 0
|
||||
redirect_to conference_tickets_path(@conference.short_title),
|
||||
error: 'Please get at least one registration ticket to continue.'
|
||||
return
|
||||
return
|
||||
end
|
||||
|
||||
# Current user didn't have a registration ticket and is purchasing one
|
||||
if count_registration_tickets_before == 0 && count_registration_tickets_after == 1
|
||||
redirect_to new_conference_conference_registration_path(@conference.short_title)
|
||||
else
|
||||
else
|
||||
redirect_to conference_physical_tickets_path
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
def index
|
||||
|
|
|
|||
|
|
@ -110,11 +110,6 @@ class TicketPurchase < ApplicationRecord
|
|||
errors.add(:quantity, 'cannot be greater than one for registration tickets.')
|
||||
end
|
||||
end
|
||||
|
||||
# def has_registration_ticket_for?(conference)
|
||||
# # BUG: ticket_purchase has only one ticket?
|
||||
# ticket.try(:registration_ticket?)
|
||||
# end
|
||||
end
|
||||
|
||||
private
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue