質問編集履歴
4
修正
test
CHANGED
File without changes
|
test
CHANGED
@@ -44,8 +44,10 @@
|
|
44
44
|
|
45
45
|
## 教えていただいて実装しました
|
46
46
|
|
47
|
-
一部エラー内容が現れたみたいです
|
47
|
+
ありがとうございます。一部エラー内容が現れたみたいです
|
48
48
|
|
49
49
|
> ActiveRecord::StatementInvalid - Mysql2::Error: Expression #10 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'diary_app_development.likes.id' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by: SELECT *, COUNT(*) AS likes_count FROM `diaries` LEFT OUTER JOIN `likes` ON `likes`.`diary_id` = `diaries`.`id` GROUP BY diaries.id ORDER BY `likes_count` ASC LIMIT 5 OFFSET 0:
|
50
50
|
|
51
|
+
|
52
|
+
|
51
53
|
![イメージ説明](a7cca96cd9881d69984854e7dc7f28a2.png)
|
3
修正
test
CHANGED
File without changes
|
test
CHANGED
@@ -42,4 +42,10 @@
|
|
42
42
|
|
43
43
|
```
|
44
44
|
|
45
|
+
## 教えていただいて実装しました
|
46
|
+
|
47
|
+
一部エラー内容が現れたみたいです
|
48
|
+
|
49
|
+
> ActiveRecord::StatementInvalid - Mysql2::Error: Expression #10 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'diary_app_development.likes.id' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by: SELECT *, COUNT(*) AS likes_count FROM `diaries` LEFT OUTER JOIN `likes` ON `likes`.`diary_id` = `diaries`.`id` GROUP BY diaries.id ORDER BY `likes_count` ASC LIMIT 5 OFFSET 0:
|
50
|
+
|
45
51
|
![イメージ説明](a7cca96cd9881d69984854e7dc7f28a2.png)
|
2
画像追加忘れ
test
CHANGED
File without changes
|
test
CHANGED
@@ -41,3 +41,5 @@
|
|
41
41
|
end
|
42
42
|
|
43
43
|
```
|
44
|
+
|
45
|
+
![イメージ説明](a7cca96cd9881d69984854e7dc7f28a2.png)
|
1
誤字の修正
test
CHANGED
File without changes
|
test
CHANGED
@@ -41,7 +41,3 @@
|
|
41
41
|
end
|
42
42
|
|
43
43
|
```
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
ユーザーをクラスメソッドを挟んで、ユーザーの投稿数の多い順にユーザーを並び替えるようにしました。
|