<commit_before>module Subscriber
  class ApplicationController < ActionController::Base

    def current_account
      if user_signed_in?
        @current_account ||= begin
                               account_id = env["warden"].user(:scope => :account)
                               Subscriber::Account.find(account_id)
                             end
      end
    end

    helper_method :current_account
    def current_user
      if user_signed_in?
        @current_user ||= begin
                            user_id = env["warden"].user(:scope => :user)
                            Subscriber::User.find(user_id)
                          end
      end
    end

    helper_method :current_user
    def user_signed_in?
      env["warden"].authenticated?(:user)
    end

    helper_method :user_signed_in?

  def authenticate_user!
    unless user_signed_in?
      flash[:notice] = "Please sign in."
      redirect_to "/sign_in"
    end
  end

  def force_authentication!(account, user)
    env["warden"].set_user(user, :scope => :user)
    env["warden"].set_user(account, :scope => :account)
  end
  end



end<commit_msg>dont need the methods from app.controller<commit_after>module Subscriber
  class ApplicationController < ActionController::Base

  end
end
{'fraction_non_alphanumeric': 0.08753943217665615, 'fraction_numerical': 0.0, 'mean_word_length': 2.125615763546798, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, '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': '5895359', 'n_tokens_mistral': 360, 'n_tokens_neox': 348, 'n_words': 76}