Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Rails 3 - Customizing the Error & 404 pages

I'm building a Rails 3 app on Heroku. Right now my error pages and 404 page are all standard rails/heroku pages.

I'd like to customize these two. Have a page for an error, and have a page for a 404.

All the tutorials found on google are years old, and don't work on Rails 3.

Can you please suggest a good modern tutorial or tips on how to do the above?

Thanks

like image 408
AnApprentice Avatar asked Nov 23 '10 20:11

AnApprentice


1 Answers

If you want to capture specific errors, use rescue_from in ApplicationController.

Otherwise if you just want to edit the default error pages, edit the 500.html and 400.html files in {Rails.root}/public

like image 79
Ryan Bigg Avatar answered Sep 26 '22 03:09

Ryan Bigg