Class: HostsController

Inherits:
ApplicationController show all
Defined in:
app/controllers/hosts_controller.rb

Instance Method Summary collapse

Instance Method Details

#editObject


11
12
13
# File 'app/controllers/hosts_controller.rb', line 11

def edit
  @host = Host.find(params[:id])
end

#indexObject


2
3
4
5
# File 'app/controllers/hosts_controller.rb', line 2

def index
  @hosts = Host.all
  @hosts.map(&:update_status)
end

#newObject


7
8
9
# File 'app/controllers/hosts_controller.rb', line 7

def new
  @host = Host.new
end