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:
siddhantbajaj 2017-08-22 14:57:42 +05:30
parent ca5d139dc2
commit 69e30e7ba9
5 changed files with 49 additions and 2 deletions

View file

@ -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