0
0
Fork 0

convert the RouteNotFound route to a controller

This way RouteNotFound can use the renderer to display a more helpful
message in the design of the rest of the page.
This commit is contained in:
Gibheer 2014-02-13 22:41:09 +01:00
parent ea72da5259
commit 256b4da778
1 changed files with 3 additions and 5 deletions

View File

@ -1,10 +1,8 @@
module Routes
class RouteNotFound
def self.call(session)
class RouteNotFound < Controller
def self.get(session)
session.options[:render] = 'error/route_not_found'
session.response.status = 404
session.response.content_type = 'text/html'
session.response.body = 'This page does not exist!'
nil
end
end
end