Ghost/core/client/app/controllers/settings/code-injection.js
Jason Williams 42166c8d9f Update Ember to 1.13.2
- Refactor to handle deprecations including removal of
  all Views, ArrayControllers, and ItemControllers.
2015-06-24 11:47:28 -05:00

22 lines
609 B
JavaScript

import Ember from 'ember';
export default Ember.Controller.extend({
notifications: Ember.inject.service(),
actions: {
save: function () {
var notifications = this.get('notifications');
return this.get('model').save().then(function (model) {
notifications.closePassive();
notifications.showSuccess('Settings successfully saved.');
return model;
}).catch(function (errors) {
notifications.closePassive();
notifications.showErrors(errors);
});
}
}
});