<commit_before>class Users::PressSummariesController < Users::BaseController
  skip_before_action :authenticate_user!

  before_action :check_deadline, :load_press_summary
  before_action :check_promotion_award_acceptance, except: [:acceptance, :update_acceptance]

  expose(:form_answer) do
    FormAnswer.find(params[:form_answer_id])
  end

  def update
    @press_summary.reviewed_by_user = true

    if @press_summary.update_attributes(press_summary_params)
      flash.notice = "Press Comment successfully updated"
      redirect_to action: :show, token: params[:token]
    else
      render :show
    end
  end

  def update_acceptance
    if params[:form_answer][:accepted] == "true"
      form_answer.update_column(:accepted, true)
      redirect_to action: :show, token: params[:token]
    else
      form_answer.update_column(:accepted, false)
      redirect_to root_url
    end<commit_msg>do not skip validation<commit_after>class Users::PressSummariesController < Users::BaseController
  skip_before_action :authenticate_user!

  before_action :check_deadline, :load_press_summary
  before_action :check_promotion_award_acceptance, except: [:acceptance, :update_acceptance]

  expose(:form_answer) do
    FormAnswer.find(params[:form_answer_id])
  end

  def update
    @press_summary.reviewed_by_user = true

    if @press_summary.update(press_summary_params)
      flash.notice = "Press Comment successfully updated"
      redirect_to action: :show, token: params[:token]
    else
      render :show
    end
  end

  def update_acceptance
    if params[:form_answer][:accepted] == "true"
      form_answer.update(accepted: true)
      redirect_to action: :show, token: params[:token]
    else
      form_answer.update(accepted: false)
      redirect_to root_url
    end
{'fraction_non_alphanumeric': 0.08408071748878924, 'fraction_numerical': 0.0, 'mean_word_length': 4.5092592592592595, 'pattern_counts': {'":': 0, '<': 5, '<?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': '1686289', 'n_tokens_mistral': 554, 'n_tokens_neox': 539, 'n_words': 114}