Forum: Ruby on Rails replace unkown action with 404

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Adam D. (Guest)
on 2006-01-06 16:05
(Received via mailing list)
is there a way to replace unkown action error with a pretty 404 page ?

I set the ErrorDocument 404 in .htaccess, however when someong goes to
http://www.mysite.com/bogus i would like it to show a 404 error instead
of
just "Uknown action".

Is this possible with a rescue or something?

adam
Jakob L. Skjerning (Guest)
on 2006-01-06 19:27
(Received via mailing list)
Adam D. wrote:
> is there a way to replace unkown action error with a pretty 404 page ?
[...]
> Is this possible with a rescue or something?

Your public/404.html will be shown in Production mode. The "Unknown
action" is the more informative message you get in Development.

To read more about how to do fancy things with errors and error messages
check out
<http://wiki.rubyonrails.com/rails/pages/HowtoConfi...
.
Adam D. (Guest)
on 2006-01-06 21:54
(Received via mailing list)
thanks you are indeed correct.

-adam
This topic is locked and can not be replied to.