<commit_before>class ApplicationController < ActionController::Base
  # Prevent CSRF attacks by raising an exception.
  # For APIs, you may want to use :null_session instead.
  protect_from_forgery with: :exception
  before_filter :set_faye_url
  
  def set_faye_url
    session[:faye_url] = Rails.env.development? ? "http://#{IPSocket.getaddress(Socket.gethostname)}:9292/faye" : "http://www.railstogo.com:9292/faye"
  end
  
  def set_locale
    unless params[:locale].blank?
      session[:locale] = params[:locale]
    end
    I18n.locale = session[:locale] || I18n.default_locale
  end

end<commit_msg>Cambios<commit_after>class ApplicationController < ActionController::Base
  # Prevent CSRF attacks by raising an exception.
  # For APIs, you may want to use :null_session instead.
  protect_from_forgery with: :exception
  before_filter :set_faye_url
  rescue_from ActionController::RoutingError, :with => :render_root
  
  def set_faye_url
    session[:faye_url] = Rails.env.development? ? "http://#{IPSocket.getaddress(Socket.gethostname)}:9292/faye" : "http://www.railstogo.com:9292/faye"
  end
  
  def set_locale
    unless params[:locale].blank?
      session[:locale] = params[:locale]
    end
    I18n.locale = session[:locale] || I18n.default_locale
  end
  
  def render_root
    redirect_to root_path
  end

end
{'fraction_non_alphanumeric': 0.10609480812641084, 'fraction_numerical': 0.01805869074492099, 'mean_word_length': 4.32, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 4, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '5887886', 'n_tokens_mistral': 456, 'n_tokens_neox': 443, 'n_words': 94}