Class: OmahaHostsController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- OmahaHostsController
- Includes:
- Foreman::Controller::AutoCompleteSearch, ScopesPerAction
- Defined in:
- app/controllers/omaha_hosts_controller.rb
Instance Method Summary collapse
Instance Method Details
#index ⇒ Object
13 14 15 16 |
# File 'app/controllers/omaha_hosts_controller.rb', line 13 def index @hosts = action_scope_for(:index, resource_base_with_search) @last_report_ids = ForemanOmaha::OmahaReport.where(:host_id => @hosts.map(&:id)).group(:host_id).maximum(:id) end |
#welcome ⇒ Object
18 19 20 21 22 23 24 25 26 27 28 29 30 |
# File 'app/controllers/omaha_hosts_controller.rb', line 18 def welcome has_entries = begin resource_base.first.nil? rescue StandardError false end if has_entries @welcome = true render :welcome end rescue StandardError not_found end |