Class: Dallal::DallalJob

Inherits:
ActiveJob::Base
  • Object
show all
Defined in:
app/jobs/dallal/dallal_job.rb

Instance Method Summary collapse

Instance Method Details

#perform(klass, id, event) ⇒ Object

TODO This is tricky. Event is string here. Is transformed in event_subscriber from sym to string. we transform here egain to sym. Rethink this or user.notify.…



9
10
11
# File 'app/jobs/dallal/dallal_job.rb', line 9

def perform(klass, id, event)
  "#{klass}_notifier".classify.constantize.create_notification(id: id, event: event.to_sym)
end