<commit_before>module UserConcerns
  extend ActiveSupport::Concern

  included do
    def find_user
      User.find(params[:id])
    end
    def all_users
      User.all
    end
    def all_charities
      Charity.all
    end
    def authorize_user
      authorize current_user
    end
    def profile_complete
      plaid_complete &&
      stripe_complete &&
      charity_complete
    end

    def plaid_complete
      current_user.bank &&
      current_user.plaid_access_token
    end

    def charity_complete
      current_user.charity_id
    end

    def stripe_complete
      current_user.stripe_customer_id &&
      current_user.stripe_subscription_id
    end
  end
end<commit_msg>set instance variable<commit_after>module UserConcerns
  extend ActiveSupport::Concern

  included do
    def find_user
      User.find(params[:id])
    end
    def all_users
      User.all
    end
    def all_charities
      @charities = Charity.all
    end
    def authorize_user
      authorize current_user
    end
    def profile_complete
      plaid_complete &&
      stripe_complete &&
      charity_complete
    end

    def plaid_complete
      current_user.bank &&
      current_user.plaid_access_token
    end

    def charity_complete
      current_user.charity_id
    end

    def stripe_complete
      current_user.stripe_customer_id &&
      current_user.stripe_subscription_id
    end
  end
end
{'fraction_non_alphanumeric': 0.03859899928520372, 'fraction_numerical': 0.0, 'mean_word_length': 2.4229828850855744, 'pattern_counts': {'":': 0, '<': 3, '<?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': '5616500', 'n_tokens_mistral': 435, 'n_tokens_neox': 422, 'n_words': 92}