method

rescue_action_in_public

rescue_action_in_public(exception)
protected

Overwrite to implement public exception handling (for requests answering false to local_request?). By default will call render_optional_error_file. Override this method to provide more user friendly error messages.s

2Notes

how I use it

robinshe · Jun 23, 20101 thank
def rescue_action_in_public(exception)
case exception

when ActiveRecord::RecordNotFound, ActionController::UnknownAction, ActionController::RoutingError
  redirect_to errors_path(404), :status=>301
else
  redirect_to errors_path(500)
end
end

How to test custom error pages

henning · Mar 24, 2010

Here is some advice for testing custom error pages using Webrat and Cucumber:

http://gem-session.com/2010/03/testing-your-custom-error-pages-with-webrat-and-cucumber