Routing Error question

Okay, so I’ve customized my error messages with the following in

def rescue_action(exception)
@message = exception.backtrace.join("\n") unless exception
render ‘home/error_404’, :status => 404

This works except for when I try to access a controller or action that
doesn’t exist. Then I get a Routing Error on my local development

Routing Error

Recognition failed for “/randomness”

and a 500 - Internal Server Error when accessing from a remote machine.

Shouldn’t my rescue_action method capture ALL exceptions? I don’t want
my users ever seeing “500 - Internal Server Error”.


This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs