Merge branch 'dev_course' of http://bdgit.educoder.net/Hjqreturn/educoder into dev_course

dev_course
cxt 6 years ago
commit 7f2da03de6

@ -62,3 +62,8 @@ testeduplus2.educoder.net/games/*
# 文件上传ActiveStorage # 文件上传ActiveStorage
# 新能bootsnap # 新能bootsnap
# 注意事项:
# 第一次部署需要执行一些rake任务
# 配置redis地址
# 配置gitlab/intializers/gitlab_config.yml

@ -244,6 +244,7 @@ class ApplicationController < ActionController::Base
# Returns the current user or nil if no user is logged in # Returns the current user or nil if no user is logged in
# and starts a session if needed # and starts a session if needed
def find_current_user def find_current_user
uid_logger("user setup start: session[:user_id] is #{session[:user_id]}")
if session[:user_id] if session[:user_id]
# existing session # existing session
(User.active.find(session[:user_id]) rescue nil) (User.active.find(session[:user_id]) rescue nil)

@ -96,7 +96,7 @@ Rails.application.configure do
config.active_record.belongs_to_required_by_default = false config.active_record.belongs_to_required_by_default = false
# config.cache_store = :file_store, "#{Rails.root }/files/cache_store/" # config.cache_store = :file_store, "#{Rails.root }/files/cache_store/"
config.cache_store = :redis_store, 'redis://10.9.72.102:6379/0/cache', { expires_in: 90.minutes } config.cache_store = :redis_store, 'redis://`10.9.72.102:637`9/0/cache', { expires_in: 90.minutes }
config.action_mailer.delivery_method = :smtp config.action_mailer.delivery_method = :smtp
config.action_mailer.smtp_settings = { config.action_mailer.smtp_settings = {

Loading…
Cancel
Save