temp
This commit is contained in:
parent
8c230352f9
commit
c1fe73df03
3 changed files with 38 additions and 14 deletions
|
|
@ -346,6 +346,20 @@ class User < ApplicationRecord
|
|||
events.where(program_id: conference.program.id, 'event_users.event_role': 'volunteer')
|
||||
end
|
||||
|
||||
def has_registration_ticket_for?(conference)
|
||||
seen_registration = false
|
||||
for ticket_purchase in current_user.ticket_purchases.by_conference(@conference)
|
||||
for physical_ticket in ticket_purchase.physical_tickets
|
||||
if physical_ticket.ticket.registration_ticket
|
||||
seen_registration = true
|
||||
break
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
return seen_registration
|
||||
end
|
||||
|
||||
def self.empty?
|
||||
User.count == 1 && User.first.email == 'deleted@localhost.osem'
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue