Memorize config options instead of reading them from file over and over again

This commit is contained in:
Sebastian Serth
2022-09-23 11:39:08 +02:00
parent c2c8cf4ae6
commit 5881795d5f
5 changed files with 11 additions and 22 deletions

View File

@ -5,6 +5,7 @@ class ApplicationController < ActionController::Base
include Pundit::Authorization
MEMBER_ACTIONS = %i[destroy edit show update].freeze
RENDER_HOST = CodeOcean::Config.new(:code_ocean).read[:render_host]
after_action :verify_authorized, except: %i[welcome]
around_action :mnemosyne_trace