<commit_before>class Tier1Controller < ApplicationController
  before_filter :login_required

  def index
    set_page_title("Tier1")

    @is_disable = !current_user.profile_tiers.blank?
  end

  def update
    unless params["tier1"].blank?
      params["tier1"].each do |tier1|
        profile_tier = ProfileTier.create(:tier_info => tier1)
        profile_tier.user_id = current_user.id
        profile_tier.save
      end

      flash[:notice] = "Tier1 Updated"
    end

    redirect_to tier1_index_path
  end
end<commit_msg>SAT-138 message for tier 1<commit_after>class Tier1Controller < ApplicationController
  before_filter :login_required

  def index
    set_page_title("Tier1")

    @is_disable = !current_user.profile_tiers.blank?
    if @is_disable
      flash[:error] = "You have already answered this profile question"
    end
  end

  def update
    unless params["tier1"].blank?
      params["tier1"].each do |tier1|
        profile_tier = ProfileTier.create(:tier_info => tier1)
        profile_tier.user_id = current_user.id
        profile_tier.save
      end

      flash[:notice] = "Tier1 Updated"
    end

    redirect_to tier1_index_path
  end
end
{'fraction_non_alphanumeric': 0.08376068376068375, 'fraction_numerical': 0.017094017094017096, 'mean_word_length': 3.212230215827338, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '109749', 'n_tokens_mistral': 393, 'n_tokens_neox': 363, 'n_words': 80}