search for: handle404notfound

Displaying 1 result from an estimated 1 matches for "handle404notfound".

2009 Apr 03
0
Truncated development log when using rescue_from
...but the correct 404 status code is returned back to my client program. Completed in 81ms (View: 0, DB: 2) | 404 Not Found [http://localhost/services/domains/test6] My rescue_from implementation: class ApplicationController < ActionController::Base rescue_from InvalidDomainError, :with => :handle404NotFound ... def handle404NotFound(e) render :xml => generateErrorXML(e.to_s), :status => 404 end def generateErrorXML(error_str) "<?xml version=\"1.0\" encoding=\"UTF-8\"?> <error> <method>#{request.method}</method> &l...