mirror of
https://github.com/TryGhost/Ghost.git
synced 2024-12-15 19:52:01 +03:00
42166c8d9f
- Refactor to handle deprecations including removal of all Views, ArrayControllers, and ItemControllers.
22 lines
609 B
JavaScript
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);
|
|
});
|
|
}
|
|
}
|
|
});
|