Themed prefetching

This commit is contained in:
kibigo! committed 2017-11-16 21:37:08 -08:00
1 parent b28b405b97
commit 585758a373
6 files changed
+31 -14

No files matched your search

@@ -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)