<commit_before># Author::    <NAME>  (mailto: rocketboys at rocketboys dot co dot nz)
# Copyright:: Copyright (c) 2008 Rocket Boys Ltd
# License::   BSD Licence, see application root.

# Filters added to this controller apply to all controllers in the application.
# Likewise, all the methods added will be available for all controllers.

class ApplicationController < ActionController::Base
  include AuthenticatedSystem
  
  helper :all
  
  layout 'master'
  
  protect_from_forgery
  
  before_filter :login_required
  
  # simple error handling when in production environment
  if RAILS_ENV == 'production'
    rescue_from ActionController::UnknownAction, :with => :not_found
    rescue_from NoMethodError, :with => :not_found
    rescue_from NameError, :with => :not_found
  end
  
  protected
  
    # Handle the not_found action which occurs when an Exception happens.
    # Modify this for emailing exception notices.
    def not_found
      redirect_to :controller => "about", :action => 'errorpage'
    end
    
    def set_mail_url
      UserMailer.default_url_options[:host] = request.host_with_port
    end

end
<commit_msg>Ruby whitespace conventions.<commit_after># Author::    <NAME>  (mailto: rocketboys at rocketboys dot co dot nz)
# Copyright:: Copyright (c) 2008 Rocket Boys Ltd
# License::   BSD Licence, see application root.

# Filters added to this controller apply to all controllers in the application.
# Likewise, all the methods added will be available for all controllers.

class ApplicationController < ActionController::Base
  include AuthenticatedSystem
  
  helper :all
  
  layout 'master'
  
  protect_from_forgery
  
  before_filter :login_required
  
  # simple error handling when in production environment
  if RAILS_ENV == 'production'
    rescue_from ActionController::UnknownAction, :with => :not_found
    rescue_from NoMethodError, :with => :not_found
    rescue_from NameError, :with => :not_found
  end
  
  protected

  # Handle the not_found action which occurs when an Exception happens.
  # Modify this for emailing exception notices.
  def not_found
    redirect_to :controller => "about", :action => 'errorpage'
  end
  
  def set_mail_url
    UserMailer.default_url_options[:host] = request.host_with_port
  end

end

{'fraction_non_alphanumeric': 0.06737120211360634, 'fraction_numerical': 0.0035226772346983706, 'mean_word_length': 3.982456140350877, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 15, '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': '5778130', 'n_tokens_mistral': 664, 'n_tokens_neox': 645, 'n_words': 228}