Sha256: da11e9f5d3fea268e1f59b9e20aa7f4dbf567fc23a0f4183820efd8c6bc842cc
Contents?: true
Size: 411 Bytes
Versions: 4
Compression:
Stored size: 411 Bytes
Contents
class Admin::BaseController < ActionController::Base include Pagy::Backend before_action :set_time_zone before_action :authenticate private def set_time_zone Time.zone = cookies[:time_zone] end def authenticate if user = Admin::User.find_by_id(session[:admin_user_id]) Admin::Current.user = user else redirect_to admin_sign_in_path end end end
Version data entries
4 entries across 4 versions & 1 rubygems