blob: 3471828fc4610822f423fd13dda36b26e5261e2b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
<div class="space-y-4">
<h1>Start a run</h1>
<p>This run will start checked out to you.</p>
<%= form_with model: @run, class: "space-y-4" do |f| %>
<div>
<%= f.label :game_id, "Game" %>
<%= f.collection_select :game_id, Game.all, :id, :title, {prompt: "Choose..."} %>
</div>
<div>
<%= f.label :title %>
<%= f.text_field :title %>
</div>
<div>
<%= f.label :description %>
<%= f.text_area :description %>
</div>
<div>
<%= f.submit "Start run", class: "btn-primary" %>
</div>
<% if @run.errors.any? %>
<div>
<p><%= pluralize(@run.errors.count, "error") %> prohibited this run from being saved:</p>
<ul>
<% @run.errors.full_messages.each do |message| %>
<li><%= message %></li>
<% end %>
</ul>
</div>
<% end %>
<% end %>
</div>
|