Page Menu
Home
GRNET
Search
Configure Global Search
Log In
Files
F2569732
hosts_controller.rb
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Flag For Later
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Wed, Jun 10, 6:44 PM
Size
372 B
Mime Type
text/x-ruby
Expires
Fri, Jun 12, 6:44 PM (1 d, 5 h)
Engine
blob
Format
Raw Data
Handle
395799
Attached To
rARCHIVING archiving
hosts_controller.rb
View Options
class
HostsController
<
ApplicationController
# before_action :fetch_params, only: :create
def
new
@host
=
Host
.
new
end
def
create
@host
=
Host
.
new
(
fetch_params
)
if
@host
.
save
redirect_to
root_path
else
render
:new
end
end
private
def
fetch_params
params
.
require
(
:host
)
.
permit
(
:name
,
:fqdn
,
:port
,
:password
)
end
end
Event Timeline
Log In to Comment