summaryrefslogtreecommitdiff
path: root/app/controllers/admin/appearances_controller.rb
diff options
context:
space:
mode:
authorYorick Peterse <yorickpeterse@gmail.com>2017-08-09 16:41:51 +0200
committerYorick Peterse <yorickpeterse@gmail.com>2017-08-10 12:45:49 +0200
commit26bb50412ce44be434d7bb86a952397b7983deb5 (patch)
treeae68cd680fc814930299c2c68f414bc2edb70757 /app/controllers/admin/appearances_controller.rb
parent53ee38053cb924b57447e385dee2a45b8e759ff5 (diff)
downloadgitlab-ce-26bb50412ce44be434d7bb86a952397b7983deb5.tar.gz
Cache Appearance instances in Redisappearances-caching-and-schema
This caches the result of Appearance.first in a similar fashion to how ApplicationSetting instances are cached. We also add some NOT NULL constraints to the table and correct the timestamp types. Fixes gitlab-org/gitlab-ce#36066, fixes gitlab-org/gitlab-ce#31698
Diffstat (limited to 'app/controllers/admin/appearances_controller.rb')
-rw-r--r--app/controllers/admin/appearances_controller.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/controllers/admin/appearances_controller.rb b/app/controllers/admin/appearances_controller.rb
index 4b0ec54b3f4..92df1c8dff0 100644
--- a/app/controllers/admin/appearances_controller.rb
+++ b/app/controllers/admin/appearances_controller.rb
@@ -45,7 +45,7 @@ class Admin::AppearancesController < Admin::ApplicationController
# Use callbacks to share common setup or constraints between actions.
def set_appearance
- @appearance = Appearance.last || Appearance.new
+ @appearance = Appearance.current || Appearance.new
end
# Only allow a trusted parameter "white list" through.