dashboard_controller.rb 346 Bytes
class DashboardController < ApplicationController
  def index
    @hosts = Host.all

    @hosts.map { |host|
      if host.lxd_config.auth == 'untrusted'
        session[:return_to] = request.env["REQUEST_URI"]
        redirect_to controller: 'hosts', action: 'auth', id: host.id
        return
      end
    }
  end
end
# vim: set et ts=2 sw=2: