# frozen_string_literal: true module Account class BaseController < ApplicationController layout 'cabinet' before_action :reset_cache before_action :authenticate_account! before_action :set_account private def authenticate_account! # store_location_for(:account, request.fullpath) if request.format.html? # we don't have new session path :( redirect_to(root_path(anchor: 'login-required')) unless account_signed_in? end def set_account @account = current_account end end end