Module: ForemanCustomTab::HostsControllerExtensions

Extended by:
ActiveSupport::Concern
Defined in:
app/controllers/concerns/foreman_custom_tab/hosts_controller_extensions.rb

Overview

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

Instance Method Summary collapse

Instance Method Details

#custom_tabObject



6
7
8
9
10
11
12
13
# File 'app/controllers/concerns/foreman_custom_tab/hosts_controller_extensions.rb', line 6

def custom_tab
  # We can't add a before_filter :find_resource for Cockpit actions as
  # it'll override the default find_resource filter.
  find_resource
  render :partial => 'foreman_custom_tab/hosts/custom_tab', :locals => { :host => @host }
rescue ActionView::Template::Error => e
  process_ajax_error e, 'fetch custom tab information'
end