質問編集履歴
7
修正
title
CHANGED
File without changes
|
body
CHANGED
@@ -29,7 +29,7 @@
|
|
29
29
|
|
30
30
|
```datajs
|
31
31
|
var data = <%= @data %>;
|
32
|
-
var result = '<ul class="info">'
|
32
|
+
var result = '<ul class="info">'
|
33
33
|
data.forEach(function(e){
|
34
34
|
result += '<li>' + e.title + '</li><hr>';
|
35
35
|
});
|
6
情報の追加
title
CHANGED
File without changes
|
body
CHANGED
@@ -50,4 +50,18 @@
|
|
50
50
|
setTimeout(f, 600000);
|
51
51
|
f();
|
52
52
|
</script>
|
53
|
+
```
|
54
|
+
|
55
|
+
追記:デロッパーツールでこのような表示がありました
|
56
|
+
|
57
|
+
```
|
58
|
+
VM340:2 Uncaught SyntaxError: Unexpected token 'var'
|
59
|
+
at DOMEval (DOMEval.js:38)
|
60
|
+
at Function.globalEval (core.js:197)
|
61
|
+
...
|
62
|
+
|
63
|
+
var data =
|
64
|
+
var result += '<ul class="info">' ←ここを指してた
|
65
|
+
data.forEach(function(e){
|
66
|
+
|
53
67
|
```
|
5
title
CHANGED
File without changes
|
body
CHANGED
File without changes
|
4
情報の追加
title
CHANGED
File without changes
|
body
CHANGED
@@ -2,6 +2,14 @@
|
|
2
2
|
|
3
3
|
何回も質問すみません。毎回同じですが、なにかわかる方は回答お願いします。
|
4
4
|
|
5
|
+
```log
|
6
|
+
Started GET "/news/data" for ::1 at 2020-08-16 14:50:53 +0900
|
7
|
+
Processing by NewsController#data as */*
|
8
|
+
Rendering news/data.js.erb
|
9
|
+
Rendered news/data.js.erb (Duration: 0.2ms | Allocations: 4)
|
10
|
+
Completed 200 OK in 860ms (Views: 10.4ms | ActiveRecord: 0.0ms | Allocations: 1951)
|
11
|
+
```
|
12
|
+
|
5
13
|
```controller
|
6
14
|
|
7
15
|
require 'uri'
|
3
title
CHANGED
File without changes
|
body
CHANGED
@@ -1,5 +1,7 @@
|
|
1
|
-
NewsAPIを使いJsonデータを取得するとところまでは以前の質問で出来たのですがJqueryでjsonデータをhtmlに表示するところでもハマってしまいました。
|
1
|
+
NewsAPIを使いJsonデータを取得するとところまでは以前の質問で出来たのですがJqueryでjsonデータをhtmlに表示するところでもハマってしまいました。errorは出てませんが表示がされません。
|
2
2
|
|
3
|
+
何回も質問すみません。毎回同じですが、なにかわかる方は回答お願いします。
|
4
|
+
|
3
5
|
```controller
|
4
6
|
|
5
7
|
require 'uri'
|
2
title
CHANGED
File without changes
|
body
CHANGED
File without changes
|
1
タグの追加
title
CHANGED
File without changes
|
body
CHANGED
File without changes
|