<commit_before>class DevLogInController < ApplicationController

  def log_in
    if Rails.env.development? || Rails.env.test?
      user = User.where(["email LIKE ?", params[:login]+'%']).first || (raise "Can't find user '#{params[:login]}'")
      sign_in_and_redirect(user)
    else
      raise "Works only in development or test env"
    end
  end

end<commit_msg>Explicit search by username in email string<commit_after>class DevLogInController < ApplicationController

  def log_in
    if Rails.env.development? || Rails.env.test?
      user = User.where(User.arel_table[:email].matches("#{params[:login]}@%")).first!
      sign_in_and_redirect(user)
    else
      raise "Works only in development or test env"
    end
  end

end
{'fraction_non_alphanumeric': 0.11956521739130435, 'fraction_numerical': 0.0, 'mean_word_length': 3.848684210526316, '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': '2965096', 'n_tokens_mistral': 235, 'n_tokens_neox': 222, 'n_words': 58}