logs user info in officer_assignments
In case user is no longer a poll officer, info on who did what is stored in officer_assignment
This commit is contained in:
@@ -15,5 +15,11 @@ class Poll
|
||||
|
||||
scope :voting_days, -> { where(final: false) }
|
||||
scope :final, -> { where(final: true) }
|
||||
|
||||
before_create :log_user_data
|
||||
|
||||
def log_user_data
|
||||
self.user_data_log = "#{officer.user_id} - #{officer.user.name_and_email}"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user