質問編集履歴
2
誤字の修正
test
CHANGED
File without changes
|
test
CHANGED
@@ -24,6 +24,84 @@
|
|
24
24
|
|
25
25
|
```
|
26
26
|
|
27
|
+
15 <%= link_to "Delete", post, method: :delete, data: { confirm: "You sure?" }, class: 'btn btn-danger btn-sm' %>
|
28
|
+
|
29
|
+
16 <% else %>
|
30
|
+
|
31
|
+
17 <%= link_to 'Comment', comment_path, {controller: :comment, action: :create}, class: 'btn btn-primary btn-sm' %>
|
32
|
+
|
33
|
+
18 <% end %>
|
34
|
+
|
35
|
+
19 </div>
|
36
|
+
|
37
|
+
20 <div>
|
38
|
+
|
39
|
+
```
|
40
|
+
|
41
|
+
Trace of template inclusion: #<ActionView::Template app/views/toppages/index.html.erb locals=[]>
|
42
|
+
|
43
|
+
|
44
|
+
|
45
|
+
Rails.root: /home/ubuntu/environment/englishcommunity
|
46
|
+
|
47
|
+
|
48
|
+
|
49
|
+
Application Trace | Framework Trace | Full Trace
|
50
|
+
|
51
|
+
app/views/posts/_posts.html.erb:17
|
52
|
+
|
53
|
+
app/views/posts/_posts.html.erb:3
|
54
|
+
|
55
|
+
app/views/toppages/index.html.erb:12
|
56
|
+
|
57
|
+
|
58
|
+
|
59
|
+
というエラーが発生しており解決方法がわかりません。
|
60
|
+
|
61
|
+
|
62
|
+
|
63
|
+
現在実装済みの機能としては、投稿機能、フォロー・アンフォロー機能、ログイン機能等です。
|
64
|
+
|
65
|
+
|
66
|
+
|
67
|
+
お手数おかけいたしますが、何卒よろしくお願いいたします。
|
68
|
+
|
69
|
+
|
70
|
+
|
71
|
+
|
72
|
+
|
73
|
+
○該当のソースコード
|
74
|
+
|
75
|
+
```
|
76
|
+
|
77
|
+
<% if posts.any? %>
|
78
|
+
|
79
|
+
<ul class="list-unstyled mt-2">
|
80
|
+
|
81
|
+
<% posts.each do |post| %>
|
82
|
+
|
83
|
+
<li class="d-flex">
|
84
|
+
|
85
|
+
<img class="rounded me-2 mb-5" src="<%= gravatar_url(post.user, { size: 64 }) %>" alt="">
|
86
|
+
|
87
|
+
<div>
|
88
|
+
|
89
|
+
<div>
|
90
|
+
|
91
|
+
<%= link_to post.user.name, user_path(post.user), class: "text-decoration-none" %> <span class="text-muted">posted at <%= post.created_at %></span>
|
92
|
+
|
93
|
+
</div>
|
94
|
+
|
95
|
+
<div>
|
96
|
+
|
97
|
+
<p><%= post.content %></p>
|
98
|
+
|
99
|
+
</div>
|
100
|
+
|
101
|
+
<div>
|
102
|
+
|
103
|
+
<% if current_user == post.user %>
|
104
|
+
|
27
105
|
<%= link_to "Delete", post, method: :delete, data: { confirm: "You sure?" }, class: 'btn btn-danger btn-sm' %>
|
28
106
|
|
29
107
|
<% else %>
|
@@ -36,84 +114,6 @@
|
|
36
114
|
|
37
115
|
<div>
|
38
116
|
|
39
|
-
```
|
40
|
-
|
41
|
-
Trace of template inclusion: #<ActionView::Template app/views/toppages/index.html.erb locals=[]>
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
Rails.root: /home/ubuntu/environment/englishcommunity
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
Application Trace | Framework Trace | Full Trace
|
50
|
-
|
51
|
-
app/views/posts/_posts.html.erb:17
|
52
|
-
|
53
|
-
app/views/posts/_posts.html.erb:3
|
54
|
-
|
55
|
-
app/views/toppages/index.html.erb:12
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
というエラーが発生しており解決方法がわかりません。
|
60
|
-
|
61
|
-
|
62
|
-
|
63
|
-
現在実装済みの機能としては、投稿機能、フォロー・アンフォロー機能、ログイン機能等です。
|
64
|
-
|
65
|
-
|
66
|
-
|
67
|
-
お手数おかけいたしますが、何卒よろしくお願いいたします。
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
○該当のソースコード
|
74
|
-
|
75
|
-
```
|
76
|
-
|
77
|
-
<% if posts.any? %>
|
78
|
-
|
79
|
-
<ul class="list-unstyled mt-2">
|
80
|
-
|
81
|
-
<% posts.each do |post| %>
|
82
|
-
|
83
|
-
<li class="d-flex">
|
84
|
-
|
85
|
-
<img class="rounded me-2 mb-5" src="<%= gravatar_url(post.user, { size: 64 }) %>" alt="">
|
86
|
-
|
87
|
-
<div>
|
88
|
-
|
89
|
-
<div>
|
90
|
-
|
91
|
-
<%= link_to post.user.name, user_path(post.user), class: "text-decoration-none" %> <span class="text-muted">posted at <%= post.created_at %></span>
|
92
|
-
|
93
|
-
</div>
|
94
|
-
|
95
|
-
<div>
|
96
|
-
|
97
|
-
<p><%= post.content %></p>
|
98
|
-
|
99
|
-
</div>
|
100
|
-
|
101
|
-
<div>
|
102
|
-
|
103
|
-
<% if current_user == post.user %>
|
104
|
-
|
105
|
-
<%= link_to "Delete", post, method: :delete, data: { confirm: "You sure?" }, class: 'btn btn-danger btn-sm' %>
|
106
|
-
|
107
|
-
<% else %>
|
108
|
-
|
109
|
-
<%= link_to 'Comment', comment_path, {controller: :comment, action: :create}, class: 'btn btn-primary btn-sm' %>
|
110
|
-
|
111
|
-
<% end %>
|
112
|
-
|
113
|
-
</div>
|
114
|
-
|
115
|
-
<div>
|
116
|
-
|
117
117
|
</div>
|
118
118
|
|
119
119
|
</div>
|
1
エラーの内容を、スクリーンショットではなくテキストで記載しました。
test
CHANGED
File without changes
|
test
CHANGED
@@ -8,9 +8,55 @@
|
|
8
8
|
|
9
9
|
その中でコメントフォームを表示するページに画面遷移をしたいのですが、
|
10
10
|
|
11
|
+
|
12
|
+
|
13
|
+
ArgumentError in Toppages#index
|
14
|
+
|
15
|
+
Showing /home/ubuntu/environment/englishcommunity/app/views/posts/_posts.html.erb where line #17 raised:
|
16
|
+
|
17
|
+
|
18
|
+
|
19
|
+
wrong number of arguments (given 4, expected 0..3)
|
20
|
+
|
21
|
+
Extracted source (around line #17):
|
22
|
+
|
23
|
+
|
24
|
+
|
25
|
+
```
|
26
|
+
|
27
|
+
<%= link_to "Delete", post, method: :delete, data: { confirm: "You sure?" }, class: 'btn btn-danger btn-sm' %>
|
28
|
+
|
29
|
+
<% else %>
|
30
|
+
|
31
|
+
<%= link_to 'Comment', comment_path, {controller: :comment, action: :create}, class: 'btn btn-primary btn-sm' %>
|
32
|
+
|
33
|
+
<% end %>
|
34
|
+
|
35
|
+
</div>
|
36
|
+
|
37
|
+
<div>
|
38
|
+
|
39
|
+
```
|
40
|
+
|
41
|
+
Trace of template inclusion: #<ActionView::Template app/views/toppages/index.html.erb locals=[]>
|
42
|
+
|
43
|
+
|
44
|
+
|
11
|
-
|
45
|
+
Rails.root: /home/ubuntu/environment/englishcommunity
|
46
|
+
|
47
|
+
|
48
|
+
|
12
|
-
|
49
|
+
Application Trace | Framework Trace | Full Trace
|
50
|
+
|
51
|
+
app/views/posts/_posts.html.erb:17
|
52
|
+
|
53
|
+
app/views/posts/_posts.html.erb:3
|
54
|
+
|
55
|
+
app/views/toppages/index.html.erb:12
|
56
|
+
|
57
|
+
|
58
|
+
|
13
|
-
|
59
|
+
というエラーが発生しており解決方法がわかりません。
|
14
60
|
|
15
61
|
|
16
62
|
|
@@ -22,6 +68,8 @@
|
|
22
68
|
|
23
69
|
|
24
70
|
|
71
|
+
|
72
|
+
|
25
73
|
○該当のソースコード
|
26
74
|
|
27
75
|
```
|