Forum: Ruby on Rails Custom error message

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Af10464d988bde1b15b1a324237bad84?d=identicon&s=25 Dharmdip Rathod (dharmdip)
on 2009-04-28 15:27

How to get error page redirection when i am get rails conventional
exception .

Say like, i have error in my controller and rails will give me exception
and will render me error page but i want custom error page redirection.

84fbb9c2a7b05c3ddf39904514585a90?d=identicon&s=25 Franco Catena (Guest)
on 2009-04-28 19:44
(Received via mailing list)
You can define a rescue function in your ApplicationController and
then do whatever you want:

def rescue_action(exception)
# Rescue code, redirection, ecc.

This function is called if exists, if not Rails shows you the default


Franco Catena.

On Apr 28, 10:27 am, Dharmdip Rathod <rails-mailing-l...@andreas-
Af10464d988bde1b15b1a324237bad84?d=identicon&s=25 Dharmdip Rathod (dharmdip)
on 2009-04-29 06:23
Okay  ! Will follow instruction ,
This topic is locked and can not be replied to.