Class: Admin::NotifyJob

Inherits:
ApplicationJob
  • Object
show all
Defined in:
app/jobs/admin/notify_job.rb

Instance Method Summary collapse

Instance Method Details

#perform(slack_blocks) ⇒ Object



4
5
6
7
8
# File 'app/jobs/admin/notify_job.rb', line 4

def perform(slack_blocks)
  if Rails.application.config.slack_notify == true
    HTTParty.post(Rails.application.credentials.slack_notify, body: slack_blocks, headers: {"Content-Type" => "application/json"})
  end
end