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:
parent
ea72da5259
commit
256b4da778
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue