質問編集履歴
5
結果の追記
test
CHANGED
File without changes
|
test
CHANGED
@@ -130,4 +130,14 @@
|
|
130
130
|
|
131
131
|
上記のif文でN+1が発生しているようでしたが、Bulletでも検出できず悩んでおりました。
|
132
132
|
|
133
|
+
また
|
134
|
+
|
135
|
+
```ruby
|
136
|
+
|
137
|
+
ChildEvent.includes(events: :categories).references(:events,:categories)
|
138
|
+
|
139
|
+
```
|
140
|
+
|
141
|
+
などのscopeでも試しましたが同じ結果でした。
|
142
|
+
|
133
143
|
なにかアドバイスをいただければ幸いです。
|
4
タグの追加
test
CHANGED
File without changes
|
test
CHANGED
File without changes
|
3
過分の削除
test
CHANGED
File without changes
|
test
CHANGED
@@ -84,11 +84,9 @@
|
|
84
84
|
|
85
85
|
@categories = Category.all
|
86
86
|
|
87
|
-
@events = EventChild.with_parent_events.with_categories
|
87
|
+
@events = EventChild.with_parent_events.with_categories
|
88
88
|
|
89
89
|
```
|
90
|
-
|
91
|
-
この@eventsをviewに渡しています。
|
92
90
|
|
93
91
|
|
94
92
|
|
2
初心者マーク追加
test
CHANGED
File without changes
|
test
CHANGED
File without changes
|
1
Railsのバージョンを追加
test
CHANGED
File without changes
|
test
CHANGED
@@ -1,6 +1,8 @@
|
|
1
1
|
###前提・実現したいこと
|
2
2
|
|
3
|
+
Rails 4.2.5です。
|
4
|
+
|
3
|
-
|
5
|
+
Viewを表示する際にN+1問題が発生しているので原因と対策を教えていただきたく思います。
|
4
6
|
|
5
7
|
|
6
8
|
|