From 585758a373df05127b0d544ac5971ef67f053e83 Mon Sep 17 00:00:00 2001 From: kibigo! Date: Thu, 16 Nov 2017 21:35:25 -0800 Subject: Themed prefetching --- app/controllers/application_controller.rb | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'app/controllers/application_controller.rb') diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index a213302cb..f5dbe837e 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -13,6 +13,7 @@ class ApplicationController < ActionController::Base helper_method :current_account helper_method :current_session helper_method :current_theme + helper_method :theme_data helper_method :single_user_mode? rescue_from ActionController::RoutingError, with: :not_found @@ -88,6 +89,10 @@ class ApplicationController < ActionController::Base current_user.setting_theme end + def theme_data + Themes.instance.get(current_theme) + end + def cache_collection(raw, klass) return raw unless klass.respond_to?(:with_includes) -- cgit