From 4a48dc025333f3cb6de8643c9c8ee6f61ba2e44b Mon Sep 17 00:00:00 2001 From: Andrew Brown Date: Tue, 3 Aug 2021 11:57:06 -0700 Subject: [PATCH] standardize @current_user_content vs @linkables --- app/controllers/application_controller.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index bcb421cd..5e4d67dd 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -80,10 +80,10 @@ class ApplicationController < ActionController::Base # Likewise, we should also always cache Timelines & Documents if @universe_scope @current_user_content['Timeline'] = current_user.timelines.where(universe_id: @universe_scope.try(:id)).to_a - @current_user_content['Document'] = current_user.linkable_documents.includes([:user]).where(universe_id: @universe_scope.try(:id)).order('updated_at DESC').to_a + @current_user_content['Document'] = current_user.documents.includes([:user]).where(universe_id: @universe_scope.try(:id)).order('updated_at DESC').to_a else @current_user_content['Timeline'] = current_user.timelines.to_a - @current_user_content['Document'] = current_user.linkable_documents.includes([:user]).order('updated_at DESC').to_a + @current_user_content['Document'] = current_user.documents.includes([:user]).order('updated_at DESC').to_a end end