Actions that fail to perform as expected throw exceptions. These exceptions can either be rescued for the public view (with a nice user-friendly explanation) or for the developers view (with tons of debugging information). The developers view is already implemented by the Action Controller, but the public view should be tailored to your specific application. So too could the decision on whether something is a public or a developer request.

You can tailor the rescuing behavior and appearance by overwriting the following two stub methods.

Methods
Public Instance methods
local_request?(

Overwrite to expand the meaning of a local request in order to show local rescues on other occurances than the remote IP beging 127.0.0.1. For example, this include the IP of the developer machine when debugging remotely.

    # File lib/action_controller/rescue.rb, line 40
40:     def local_request? #:doc:
41:       @request.remote_addr == "127.0.0.1"
42:     end
rescue_action_in_public(exception)

Overwrite to implement public exception handling (for requests answering false to local_request?).

    # File lib/action_controller/rescue.rb, line 33
33:     def rescue_action_in_public(exception)
34:       render_text "<html><body><h1>Application error</h1></body></html>"
35:     end
Private Instance methods
rescues_path(template_name)
    # File lib/action_controller/rescue.rb, line 54
54:       def rescues_path(template_name)
55:         File.dirname(__FILE__) + "/templates/rescues/#{template_name}.rhtml"
56:       end
template_path_for_local_rescue(exception)
    # File lib/action_controller/rescue.rb, line 58
58:       def template_path_for_local_rescue(exception)
59:         rescues_path(
60:           case exception
61:             when MissingTemplate then "missing_template"
62:             when UnknownAction   then "unknown_action"
63:             when ActionView::TemplateError then "template_error"
64:             else "diagnostics"
65:           end
66:         )
67:       end