1
0
Fork 0
mirror of https://github.com/TryGhost/Ghost-Admin.git synced 2023-12-14 02:33:04 +01:00
Ghost-Admin/app/controllers/editor/new.js
2015-03-11 12:37:41 -06:00

20 lines
587 B
JavaScript

import Ember from 'ember';
import EditorControllerMixin from 'ghost/mixins/editor-base-controller';
var EditorNewController = Ember.Controller.extend(EditorControllerMixin, {
actions: {
/**
* Redirect to editor after the first save
*/
save: function (options) {
var self = this;
return this._super(options).then(function (model) {
if (model.get('id')) {
self.replaceRoute('editor.edit', model);
}
});
}
}
});
export default EditorNewController;