Skip to content

Commit fb9e82a

Browse files
committed
oof, this needs to go BEFORE we clobber @content
1 parent d102da4 commit fb9e82a

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

app/controllers/folders_controller.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,15 +34,15 @@ def show
3434
.where(context: 'Document')
3535
.order('title ASC')
3636

37+
# TODO: can we reuse this content to skip a few queries in this controller action?
38+
cache_linkable_content_for_each_content_type
39+
3740
# TODO: add other content types here too
3841
@content = Document
3942
.where(folder: @folder)
4043
.includes([:user, :page_tags, :universe])
4144
.order('documents.favorite DESC, documents.title ASC, documents.updated_at DESC')
4245

43-
# TODO: can we reuse this content to skip a few queries in this controller action?
44-
cache_linkable_content_for_each_content_type
45-
4646
if @universe_scope
4747
@content = @content.where(universe: @universe_scope)
4848
end

0 commit comments

Comments
 (0)