<commit_before># frozen_string_literal: true

class Folio::Accounts::SessionsController < Devise::SessionsController
  layout "folio/console/devise"

  def after_sign_in_path_for(_resource)
    console_root_path
  end

  def after_sign_out_path_for(_resource)
    new_account_session_path
  rescue ActionController::UrlGenerationError
    main_app.new_account_session_path
  end
end
<commit_msg>use stored_location_for in accounts/sessions#create<commit_after># frozen_string_literal: true

class Folio::Accounts::SessionsController < Devise::SessionsController
  layout "folio/console/devise"

  def after_sign_in_path_for(_resource)
    stored_location_for(:account).presence || console_root_path
  end

  def after_sign_out_path_for(_resource)
    new_account_session_path
  rescue ActionController::UrlGenerationError
    main_app.new_account_session_path
  end
end

{'fraction_non_alphanumeric': 0.06206896551724138, 'fraction_numerical': 0.0, 'mean_word_length': 6.918181818181818, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7386859', 'n_tokens_mistral': 274, 'n_tokens_neox': 272, 'n_words': 44}