<commit_before>class VolunteersController < ApplicationController

  def profile
    @volunteer = Volunteer.find(current_volunteer_user.id)
  end

  def new
    @volunteer = Volunteer.new
  end

  def create
    @volunteer = Volunteer.new(volunteer_params)
      if @volunteer.save
        log_in @volunteer
        redirect_to "/volunteers/#{@volunteer.id}/profile"
      else
        flash[:danger] = "Error creating a new instance of yourself!"
        render 'new'
      end
    end

    private

    def volunteer_params
       params.require(:volunteer).permit(:name, :age, :language, :password)
    end

end<commit_msg>add login functioniality for volunteers<commit_after>class VolunteersController < ApplicationController

  def profile
    @volunteer = Volunteer.find(current_volunteer_user.id)
  end

  def new
    @volunteer = Volunteer.new
  end

  def create
    @volunteer = Volunteer.new(volunteer_params)
      if @volunteer.save
        log_in @volunteer
        redirect_to "/volunteers/#{@volunteer.id}/profile"
      else
        flash[:danger] = "Error creating a new instance of yourself!"
        render 'new'
      end
    end

    private

    def volunteer_params
       params.require(:volunteer).permit(:username, :langauge, :certification, :password)
    end

end
{'fraction_non_alphanumeric': 0.08359133126934984, 'fraction_numerical': 0.0, 'mean_word_length': 2.9541284403669725, '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': '1354728', 'n_tokens_mistral': 413, 'n_tokens_neox': 392, 'n_words': 93}