<commit_before>class SuggestionsController < ApplicationController
  respond_to :html, :xml

  def new
    @suggestion = Suggestion.new
    respond_with @suggestion
  end

  def show
    @suggestion = Suggestion.find params[:id]
    respond_with @suggestion
  end

  def create
    @suggestion = Suggestion.new params[:suggestion]

    if verify_recaptcha(:model => @suggestion)
      if @suggestion.save
        redirect_to :root, flash: {notice: t("suggestions.create.confirmation")}
      else
        render :new
      end
    else
      flash[:error] = t("suggestions.create.wrong_recaptcha")
      render :new
    end

  end
end<commit_msg>Strong params for Suggestions Controller<commit_after>class SuggestionsController < ApplicationController
  respond_to :html, :xml

  def new
    @suggestion = Suggestion.new
    respond_with @suggestion
  end

  def show
    @suggestion = Suggestion.find params[:id]
    respond_with @suggestion
  end

  def create
    @suggestion = Suggestion.new(suggestion_params)

    if verify_recaptcha(:model => @suggestion)
      if @suggestion.save
        redirect_to :root, flash: {notice: t("suggestions.create.confirmation")}
      else
        render :new
      end
    else
      flash[:error] = t("suggestions.create.wrong_recaptcha")
      render :new
    end
  end

  def suggestion_params
    params.require(:suggestion).permit(:email_address, :description)
  end
end
{'fraction_non_alphanumeric': 0.08539167254763586, 'fraction_numerical': 0.0, 'mean_word_length': 3.2328358208955223, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 2}, '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': '4428264', 'n_tokens_mistral': 462, 'n_tokens_neox': 427, 'n_words': 103}