<commit_before># lol

module ApplicationHelper

  def utnif_type(type)
    case type.to_sym
    when :error
      'alert-danger'
    when :success
      'alert-success'
    when :warning
      'alert-warning'
    else
      'alert-info'
    end
  end

  def unread_blog_posts
    c = NewsPost.where("created_at > ? and published = true", current_user.last_sign_in_at).count
    c > 0 ? c : ""
  end
end<commit_msg>unread_blog_posts check current_user<commit_after># lol

module ApplicationHelper

  def utnif_type(type)
    case type.to_sym
    when :error
      'alert-danger'
    when :success
      'alert-success'
    when :warning
      'alert-warning'
    else
      'alert-info'
    end
  end

  def unread_blog_posts
    if current_user
      c = NewsPost.where("created_at > ? and published = true", current_user.last_sign_in_at).count
      c > 0 ? c : ""
    end
  end
end
{'fraction_non_alphanumeric': 0.08833522083805209, 'fraction_numerical': 0.0022650056625141564, 'mean_word_length': 2.536, 'pattern_counts': {'":': 0, '<': 3, '<?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': '5504382', 'n_tokens_mistral': 309, 'n_tokens_neox': 300, 'n_words': 72}