<commit_before>class HomeController < ApplicationController

  def index
  end

  def default_locale
    available = %w{en ru}
    locale = http_accept_language.compatible_language_from(available) || I18n.default_locale
    redirect_to "/#{locale}"
  end
end<commit_msg>Now available locales are not hardcoded in code<commit_after>class HomeController < ApplicationController

  def index
  end

  def default_locale
    locale = http_accept_language.compatible_language_from(I18n.available_locales) || I18n.default_locale
    redirect_to "/#{locale}"
  end
end
{'fraction_non_alphanumeric': 0.06951871657754011, 'fraction_numerical': 0.0106951871657754, 'mean_word_length': 5.043010752688172, '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': '7569102', 'n_tokens_mistral': 169, 'n_tokens_neox': 162, 'n_words': 39}