<commit_before>module ApplicationHelper
  def vendor_logged_in?
    !!session[:vendor_id]
  end

  def current_vendor
    return Vendor.find(session[:vendor_id]) if vendor_logged_in?
  end

  def current_vendors_deal?(deal)
    current_vendor == deal.vendor
  end

  def current_vendors_page?(vendor)
    current_vendor == vendor
  end

  def bootstrap_class_for(flash_type)
    { "success"=> "alert-success", "error" => "alert-danger", "alert" => "alert-warning", "notice" => "alert-info" }[flash_type] || flash_type.to_s
  end

  def current_user
     return User.find(session[:user_id]) if !!session[:user_id]
  end
end
<commit_msg>add method to check if a vendor has stripe<commit_after>module ApplicationHelper
  def vendor_logged_in?
    !!session[:vendor_id]
  end

  def current_vendor
    return Vendor.find(session[:vendor_id]) if vendor_logged_in?
  end

  def current_vendors_deal?(deal)
    current_vendor == deal.vendor
  end

  def current_vendors_page?(vendor)
    current_vendor == vendor
  end

  def bootstrap_class_for(flash_type)
    { "success"=> "alert-success", "error" => "alert-danger", "alert" => "alert-warning", "notice" => "alert-info" }[flash_type] || flash_type.to_s
  end

  def current_user
     return User.find(session[:user_id]) if !!session[:user_id]
  end

  def current_vendor_stripe_link?
    current_vendor.stripe_user_id
  end
end

{'fraction_non_alphanumeric': 0.11499272197962154, 'fraction_numerical': 0.0, 'mean_word_length': 4.522088353413655, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 11, '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': '4419222', 'n_tokens_mistral': 484, 'n_tokens_neox': 467, 'n_words': 100}