<commit_before>class Api::V0::UsersController < Api::V0::ApiController

  def me
    respond_with current_user
  end

  def search
    @users = User.where("first_name LIKE ? or username LIKE ? or last_name LIKE ?", "%#{ params[:q].capitalize }%", "%#{ params[:q] }%", "%#{ params[:q].capitalize }%")
    render json: @users, each_serializer: UserSerializer
  end

end<commit_msg>Add safe operator & for capitalizing params<commit_after>class Api::V0::UsersController < Api::V0::ApiController

  def me
    respond_with current_user
  end

  def search
    @users = User.where("first_name LIKE ? or username LIKE ? or last_name LIKE ?", "%#{ params[:q]&.capitalize }%", "%#{ params[:q] }%", "%#{ params[:q]&.capitalize }%")
    render json: @users, each_serializer: UserSerializer
  end

end
{'fraction_non_alphanumeric': 0.15822784810126583, 'fraction_numerical': 0.005063291139240506, 'mean_word_length': 4.773722627737226, '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': '2261264', 'n_tokens_mistral': 266, 'n_tokens_neox': 261, 'n_words': 62}