質問編集履歴
1
リンクとスクリーンショットの件、修正いたしました。失礼いたしました。
test
CHANGED
File without changes
|
test
CHANGED
@@ -1,10 +1,6 @@
|
|
1
1
|
現在railsでアプリを作っているものです。
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
http
|
3
|
+
[【Rails】通知機能を誰でも実装できるように解説する【いいね、コメント、フォロー】](http://qiita.com/nekojoker/items/80448944ec9aaae48d0a)
|
6
|
-
|
7
|
-
|
8
4
|
|
9
5
|
上記記事を参考にして通知機能を作っています。
|
10
6
|
|
@@ -16,7 +12,27 @@
|
|
16
12
|
|
17
13
|
### 発生している問題・エラーメッセージ
|
18
14
|
|
15
|
+
|
16
|
+
|
17
|
+
```rocal
|
18
|
+
|
19
|
+
|
20
|
+
|
21
|
+
ActiveRecord::StatementInvalid in CommentsController#create
|
22
|
+
|
23
|
+
|
24
|
+
|
25
|
+
Mysql2::Error: Expression #1 of ORDER BY clause is not in SELECT list, references column
|
26
|
+
|
27
|
+
'rails_development.comments.created_at' which is not in SELECT list; this is incompatible with
|
28
|
+
|
29
|
+
DISTINCT: SELECT DISTINCT `comments`.`user_id` FROM `comments
|
30
|
+
|
31
|
+
` WHERE `comments`.`micropost_id` = 1 AND `comments`.`user_id` != 1
|
32
|
+
|
19
|
-
|
33
|
+
ORDER BY `comments`.`created_at` DESC
|
34
|
+
|
35
|
+
```
|
20
36
|
|
21
37
|
|
22
38
|
|