質問編集履歴
5
分かりやすく
title
CHANGED
@@ -1,1 +1,1 @@
|
|
1
|
-
|
1
|
+
画像をyoutubeに変えたい
|
body
CHANGED
@@ -13,7 +13,7 @@
|
|
13
13
|
|
14
14
|
home/top.html.erb
|
15
15
|
---
|
16
|
-
|
16
|
+
```
|
17
17
|
<% if user_signed_in? %>
|
18
18
|
**<%= image_tag "sakura2.jpg",id:'toppoi-douga' %>**
|
19
19
|
**<%= link_to "たっぽい?", toppoi_path, remote:true, class: "btn btn-large register-btn" %>**
|
@@ -34,7 +34,9 @@
|
|
34
34
|
<% end %>
|
35
35
|
|
36
36
|
routes.rb
|
37
|
+
```
|
37
38
|
---
|
39
|
+
```
|
38
40
|
Rails.application.routes.draw do
|
39
41
|
resources :notes
|
40
42
|
get '/top' => 'home#top'
|
@@ -60,8 +62,10 @@
|
|
60
62
|
** def toppoi
|
61
63
|
end**
|
62
64
|
end
|
65
|
+
```
|
63
66
|
|
64
|
-
|
65
67
|
home/toppoi.js.erb
|
66
68
|
---
|
69
|
+
```
|
67
|
-
**$('#toppoi-douga').html(<iframe width="420" height="315" src="https://www.youtube.com/embed/t55VHg6R_sA" frameborder="0" allowfullscreen></iframe>)**
|
70
|
+
**$('#toppoi-douga').html(<iframe width="420" height="315" src="https://www.youtube.com/embed/t55VHg6R_sA" frameborder="0" allowfullscreen></iframe>)**
|
71
|
+
```
|
4
分かりやすく
title
CHANGED
File without changes
|
body
CHANGED
@@ -6,8 +6,11 @@
|
|
6
6
|
|
7
7
|
ajaxの練習ですが、上手くいきません・・・
|
8
8
|
|
9
|
+
※注意※
|
10
|
+
最初「たっぽい」を聞き間違いで「とっぽい」と思い込み、アクション名などtoppoiにしてしまっています。
|
9
11
|
|
10
12
|
|
13
|
+
|
11
14
|
home/top.html.erb
|
12
15
|
---
|
13
16
|
|
3
うーん
title
CHANGED
File without changes
|
body
CHANGED
@@ -59,6 +59,6 @@
|
|
59
59
|
end
|
60
60
|
|
61
61
|
|
62
|
-
toppoi.js.erb
|
62
|
+
home/toppoi.js.erb
|
63
63
|
---
|
64
64
|
**$('#toppoi-douga').html(<iframe width="420" height="315" src="https://www.youtube.com/embed/t55VHg6R_sA" frameborder="0" allowfullscreen></iframe>)**
|
2
分かりやすく
title
CHANGED
File without changes
|
body
CHANGED
@@ -12,8 +12,8 @@
|
|
12
12
|
---
|
13
13
|
|
14
14
|
<% if user_signed_in? %>
|
15
|
-
<%= image_tag "sakura2.jpg",id:'toppoi-douga' %>
|
15
|
+
**<%= image_tag "sakura2.jpg",id:'toppoi-douga' %>**
|
16
|
-
<%= link_to "たっぽい?", toppoi_path, remote:true, class: "btn btn-large register-btn" %>
|
16
|
+
**<%= link_to "たっぽい?", toppoi_path, remote:true, class: "btn btn-large register-btn" %>**
|
17
17
|
<%= link_to "どや、つぶやいてみっか?", new_note_path, class: "btn btn-large register-btn" %>
|
18
18
|
<br>
|
19
19
|
<%= link_to "どや、つぶやき見てみいへんか?", notes_path, class: "btn btn-large register-btn" %>
|
@@ -36,7 +36,7 @@
|
|
36
36
|
resources :notes
|
37
37
|
get '/top' => 'home#top'
|
38
38
|
get '/about' => 'home#about'
|
39
|
-
post '/toppoi' => 'home#toppoi'
|
39
|
+
** post '/toppoi' => 'home#toppoi'**
|
40
40
|
|
41
41
|
devise_for :users
|
42
42
|
resources :users,only:[:index,:show,:edit,:update]
|
@@ -54,11 +54,11 @@
|
|
54
54
|
def about
|
55
55
|
end
|
56
56
|
|
57
|
-
def toppoi
|
57
|
+
** def toppoi
|
58
|
-
end
|
58
|
+
end**
|
59
59
|
end
|
60
60
|
|
61
61
|
|
62
62
|
toppoi.js.erb
|
63
63
|
---
|
64
|
-
$('#toppoi-douga').html(<iframe width="420" height="315" src="https://www.youtube.com/embed/t55VHg6R_sA" frameborder="0" allowfullscreen></iframe>)
|
64
|
+
**$('#toppoi-douga').html(<iframe width="420" height="315" src="https://www.youtube.com/embed/t55VHg6R_sA" frameborder="0" allowfullscreen></iframe>)**
|
1
分かりやすく書き直しました。
title
CHANGED
File without changes
|
body
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
**狙い**
|
2
2
|
|
3
|
-
現在、トップ画面に、app/assets/imageに入れている"sakura2.jpg"の桜の写真を
|
3
|
+
現在、トップ画面に、app/assets/imageに入れている"sakura2.jpg"の桜の写真を貼っていますが、こいつをボタン一つで"たっぽい"に変えたいのです!
|
4
4
|
|
5
|
-
"たっぽい"とは、https://www.youtube.com/watch?v=t55VHg6R_sA&nohtml5=Falseです。
|
5
|
+
"たっぽい"とはyoutubeの、https://www.youtube.com/watch?v=t55VHg6R_sA&nohtml5=Falseです。
|
6
6
|
|
7
7
|
ajaxの練習ですが、上手くいきません・・・
|
8
8
|
|