Custom Error Page

Greetings

can you point me to reading material on how to create custom error page
and redirect the user accordingly ?

I found this :

http://railscasts.com/episodes/53-handling-exceptions

exactly what I was looking for !