mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-13 19:54:02 +00:00
mark user as present for the conference when user's registration ticket for that conference is scanned
13 lines
299 B
Ruby
13 lines
299 B
Ruby
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
|