Re: [nesta] Create a custom error page? (#82)
- Graham Ashton
- 2011-11-28 @ 10:45
On 23 Nov 2011, at 21:01, Benjamin Charity wrote:
> I feel like I'm going crazy...this is usually a fairly simple task.
This is my first foray into Nesta so I may have missed it?
I haven't written about it on the site, but I can see that's something
Because Nesta is written in Sinatra, it's using Sinatra's approach to 404 pages.
Sinatra handles 404 pages with some code like this:
'This is nowhere to be found.'
To define this in Nesta you need to create an app.rb file in your project,
and add something like this to it:
'Text of error page'
If you want to render a special template for it, you could put this in the
You'd need a views/my_error_page.haml file to get that last example to work.
More info on Sinatra's handlers can be found here: