質問編集履歴
1
追記
title
CHANGED
File without changes
|
body
CHANGED
@@ -14,4 +14,26 @@
|
|
14
14
|
```
|
15
15
|
resultが空なのかな...?と思い、バリデーションを追加するも、解決に至りませんでした。
|
16
16
|
|
17
|
-
私はどこにエラーがあるのか見当もつかないため、もしほしいページや情報がありましたら追記いたします。
|
17
|
+
私はどこにエラーがあるのか見当もつかないため、もしほしいページや情報がありましたら追記いたします。
|
18
|
+
|
19
|
+
index.htnl.erb
|
20
|
+
```html.erb
|
21
|
+
<tbody>
|
22
|
+
<% @results.each do |result|%>
|
23
|
+
<tr>
|
24
|
+
<th><%= result.date %></th>
|
25
|
+
<th><%= result.map %></th>
|
26
|
+
<th><%= result.MYround %> vs <%= result.OPround %></th>
|
27
|
+
<th><%= link_to '詳細', result %></th>
|
28
|
+
<th><%= button_to "削除する", method: :delete, data: {confirm: "削除しますか?"} %></th>
|
29
|
+
</tr>
|
30
|
+
<% end %>
|
31
|
+
</tbody>
|
32
|
+
```
|
33
|
+
routes.rb
|
34
|
+
```ruby
|
35
|
+
Rails.application.routes.draw do
|
36
|
+
resources :results
|
37
|
+
root "results#index"
|
38
|
+
end
|
39
|
+
```
|