Ghost/core/client/controllers/error.js
Hannah Wolfe 299b59385b Add error template, route and controller
closes #2851

- adds asset paths to ghostPaths as we don't have an asset helper
- sends any invalid routes to 404
2014-06-24 23:33:02 +01:00

15 lines
514 B
JavaScript

var ErrorController = Ember.Controller.extend({
code: function () {
return this.get('content.status') > 200 ? this.get('content.status') : 500;
}.property('content.status'),
message: function () {
if (this.get('code') === 404) {
return 'No Ghost Found';
}
return this.get('content.statusText') !== 'error' ? this.get('content.statusText') : 'Internal Server Error';
}.property('content.statusText'),
stack: false
});
export default ErrorController;