質問編集履歴
2
f
test
CHANGED
File without changes
|
test
CHANGED
@@ -153,3 +153,17 @@
|
|
153
153
|
|
154
154
|
|
155
155
|
@reqsだとエラーになりませんが、なぜでしょうか?
|
156
|
+
|
157
|
+
|
158
|
+
|
159
|
+
|
160
|
+
|
161
|
+
追記
|
162
|
+
|
163
|
+
ログを見ると、変数名を変更時はSQLが発行されていません。
|
164
|
+
|
165
|
+
なのでnilが返ってきてるようです。
|
166
|
+
|
167
|
+
|
168
|
+
|
169
|
+
ActionView::Template::Error (The @reqs variable appears to be empty. Did you forget to pass the collection object for will_paginate?):
|
1
kl
test
CHANGED
File without changes
|
test
CHANGED
@@ -20,7 +20,7 @@
|
|
20
20
|
|
21
21
|
|
22
22
|
|
23
|
-
@reqs = Req.paginate(page: params[:page]).where(from_user_id:
|
23
|
+
@reqs = Req.paginate(page: params[:page]).where(from_user_id: current_user)
|
24
24
|
|
25
25
|
|
26
26
|
|
@@ -88,7 +88,7 @@
|
|
88
88
|
|
89
89
|
|
90
90
|
|
91
|
-
@hoge= Req.paginate(page: params[:page]).where(from_user_id:
|
91
|
+
@hoge= Req.paginate(page: params[:page]).where(from_user_id: current_user)
|
92
92
|
|
93
93
|
|
94
94
|
|