Share Pastebin
Guest
Public paste!

Untitled

By: a guest | Mar 19th, 2010 | Syntax: None | Size: 0.52 KB | Hits: 101 | Expires: Never
Copy text to clipboard
  1. class FourOhFoursController < ApplicationController
  2.   def index
  3.     FourOhFour.add_request(request.url,
  4.                            request.env['HTTP_REFERER'] || '', request.env['HTTP_USER_AGENT'] || '',
  5.                            request.remote_ip)
  6.     respond_to do |format|
  7.       format.html { render :file => "#{RAILS_ROOT}/public/404.html" ,
  8.                            :status => "404 Not Found" }
  9.       format.all { render :nothing => true,
  10.                            :status => "404 Not Found" }
  11.     end
  12.   end
  13. end