Improving check-in process
mark user as present for the conference when user's registration ticket for that conference is scanned
This commit is contained in:
parent
ca5d139dc2
commit
69e30e7ba9
5 changed files with 49 additions and 2 deletions
|
|
@ -1,3 +1,13 @@
|
|||
class TicketScanning < ActiveRecord::Base
|
||||
belongs_to :physical_ticket
|
||||
|
||||
before_create :mark_user_present
|
||||
|
||||
private
|
||||
|
||||
def mark_user_present
|
||||
if physical_ticket.ticket.registration_ticket?
|
||||
physical_ticket.user.mark_attendance_for_conference(physical_ticket.conference)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue