fix spawn server form
This commit is contained in:
parent
3b82be0b7d
commit
11d5baf130
2 changed files with 2 additions and 1 deletions
|
|
@ -1,5 +1,5 @@
|
||||||
class ServersController < ApplicationController
|
class ServersController < ApplicationController
|
||||||
before_action :set_server, only: [ :show, :edit, :update, :destroy, :start, :stop, :restart ]
|
before_action :set_server, only: [ :show, :destroy, :start, :stop, :restart ]
|
||||||
|
|
||||||
def index
|
def index
|
||||||
@servers = current_user.servers.includes(:server_template).order(created_at: :desc)
|
@servers = current_user.servers.includes(:server_template).order(created_at: :desc)
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,7 @@
|
||||||
= @server_template.name
|
= @server_template.name
|
||||||
|
|
||||||
= form_with model: @server, local: true do |f|
|
= form_with model: @server, local: true do |f|
|
||||||
|
= hidden_field_tag :server_template_id, @server_template.id if @server_template
|
||||||
- if @server.errors.any?
|
- if @server.errors.any?
|
||||||
.alert.alert--error
|
.alert.alert--error
|
||||||
h4 = pluralize(@server.errors.count, "error")
|
h4 = pluralize(@server.errors.count, "error")
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue