app controller: move session[:started_at] init to SessionLoader.

This commit is contained in:
evazion
2019-08-24 22:55:36 -05:00
parent 1a964f7a10
commit a6ed7ca936
2 changed files with 7 additions and 7 deletions

View File

@@ -5,7 +5,6 @@ class ApplicationController < ActionController::Base
before_action :set_current_user
after_action :reset_current_user
before_action :normalize_search
before_action :set_started_at_session
before_action :api_check
before_action :set_variant
before_action :track_only_param
@@ -171,12 +170,6 @@ class ApplicationController < ActionController::Base
CurrentUser.root_url = root_url.chomp("/")
end
def set_started_at_session
if session[:started_at].blank?
session[:started_at] = Time.now
end
end
def set_variant
request.variant = params[:variant].try(:to_sym)
end