Class: ForemanSlack::SlackTestsController

Inherits:
ApplicationController
  • Object
show all
Defined in:
app/controllers/foreman_slack/slack_tests_controller.rb

Overview

Example: Plugin’s HostsController inherits from Foreman’s HostsController

Instance Method Summary collapse

Instance Method Details

#test_slackObject

change layout if needed layout ‘foreman_slack/layouts/new_layout’



7
8
9
10
11
# File 'app/controllers/foreman_slack/slack_tests_controller.rb', line 7

def test_slack
  # automatically renders view/foreman_slack/hosts/new_action
  notify = ForemanSlack::SlackNotify.new
  notify.notify(_("Ahoy from Foreman !"))
end