Class: Decidim::Kids::ExpireImpersonationJob
- Inherits:
-
ApplicationJob
- Object
- ApplicationJob
- Decidim::Kids::ExpireImpersonationJob
- Defined in:
- app/jobs/decidim/kids/expire_impersonation_job.rb
Instance Method Summary collapse
Instance Method Details
#perform(user, current_user) ⇒ Object
8 9 10 11 12 13 |
# File 'app/jobs/decidim/kids/expire_impersonation_job.rb', line 8 def perform(user, current_user) impersonation_log = Decidim::Kids::ImpersonationMinorLog.where(tutor: current_user, minor: user).active.first return unless impersonation_log impersonation_log.expire! end |