<commit_before>class AccountsController < ApplicationController
  customer_tab  :all
  before_filter :authenticate_user!
  before_filter :check_acting_as
  before_filter :init_account, :only => [:show, :user_search, :transactions, :transactions_in_review ]

  include TransactionSearch
  load_and_authorize_resource :only => [:show, :user_search, :transactions, :transactions_in_review ]


  def initialize
    @active_tab = 'accounts'
    super
  end

  # GET /accounts
  def index
    @account_users = session_user.account_users.active
  end

  # GET /accounts/1
  def show
  end

  # GET /accounts/1/user_search
  def user_search
    render(:template => "account_users/user_search")
  end

  def transactions_with_search
    #@facility = @account.facility
    @order_details = @order_details.where(:account_id => @account.id)
    paginate_order_details
    @active_tab = 'accounts'
  end
  
  def transactions_in_review_with_search
    authorize! :manage, @account
    @facility = @account.facility
    @order_details = @order_details.where(:account_id => @account.id).all_in_review
    @extra_date_column = :reviewed_at
    @order_detail_link = {
      :text => "Dispute",
      :display? => Proc.new {|order_detail| order_detail.can_dispute?},<commit_msg>don't set @facility<commit_after>class AccountsController < ApplicationController
  customer_tab  :all
  before_filter :authenticate_user!
  before_filter :check_acting_as
  before_filter :init_account, :only => [:show, :user_search, :transactions, :transactions_in_review ]

  include TransactionSearch
  load_and_authorize_resource :only => [:show, :user_search, :transactions, :transactions_in_review ]


  def initialize
    @active_tab = 'accounts'
    super
  end

  # GET /accounts
  def index
    @account_users = session_user.account_users.active
  end

  # GET /accounts/1
  def show
  end

  # GET /accounts/1/user_search
  def user_search
    render(:template => "account_users/user_search")
  end

  def transactions_with_search
    #@facility = @account.facility
    @order_details = @order_details.where(:account_id => @account.id)
    paginate_order_details
    @active_tab = 'accounts'
  end
  
  def transactions_in_review_with_search
    authorize! :manage, @account
    #@facility = @account.facility
    @order_details = @order_details.where(:account_id => @account.id).all_in_review
    @extra_date_column = :reviewed_at
    @order_detail_link = {
      :text => "Dispute",
      :display? => Proc.new {|order_detail| order_detail.can_dispute?},
{'fraction_non_alphanumeric': 0.09853581321725366, 'fraction_numerical': 0.0015829046299960427, 'mean_word_length': 4.367303609341826, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 17, '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': '4923500', 'n_tokens_mistral': 846, 'n_tokens_neox': 820, 'n_words': 159}