回答編集履歴
1
show.html.erb追記
test
CHANGED
@@ -23,3 +23,33 @@
|
|
23
23
|
|
24
24
|
|
25
25
|
などの方法があると思います。
|
26
|
+
|
27
|
+
|
28
|
+
|
29
|
+
## 追記
|
30
|
+
|
31
|
+
|
32
|
+
|
33
|
+
show.html.erb
|
34
|
+
|
35
|
+
|
36
|
+
|
37
|
+
```
|
38
|
+
|
39
|
+
<h2>High Light</h2>
|
40
|
+
|
41
|
+
|
42
|
+
|
43
|
+
<h3><%= @player.name %><br></h3>
|
44
|
+
|
45
|
+
|
46
|
+
|
47
|
+
<iframe width="640" height="480" src="<%= @player.youtube_url %>" frameborder="0" allow="accelerometer; autoplay; encrypted-media; gyroscope; picture-in-picture" allowfullscreen></iframe><br>
|
48
|
+
|
49
|
+
```
|
50
|
+
|
51
|
+
|
52
|
+
|
53
|
+
`@player.youtube_url`に選手のユーチューブのurlを入れるところまでできたら、このようにsrcを設定してみましょう。
|
54
|
+
|
55
|
+
こうすることによってiframeに選手ごとに紐づいたURLが表示されるはずです。
|