about summary refs log tree commit diff
path: root/app/controllers/application_controller.rb
diff options
context:
space:
mode:
authorDavid Yip <yipdw@member.fsf.org>2017-11-17 14:01:23 -0600
committerGitHub <noreply@github.com>2017-11-17 14:01:23 -0600
commit45f18b8f494153fd63871d60782da992e847ec16 (patch)
tree82b4be5028ec4c8e066c69bdf068ac786104508f /app/controllers/application_controller.rb
parent2a386ad88dad4a076f19dbd1b085ea561868deec (diff)
parent585758a373df05127b0d544ac5971ef67f053e83 (diff)
Merge pull request #218 from glitch-soc/themed-prefetching
Themed preloading
Diffstat (limited to 'app/controllers/application_controller.rb')
-rw-r--r--app/controllers/application_controller.rb5
1 files changed, 5 insertions, 0 deletions
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)