FIX: Dismiss all button was not updating the UI

This commit is contained in:
Robin Ward 2017-05-09 13:46:10 -04:00
parent a160589e84
commit 6fdbd29882
2 changed files with 2 additions and 2 deletions

View File

@ -22,7 +22,7 @@ export default Ember.Controller.extend({
actions: {
resetNew() {
ajax('/notifications/mark-read', { method: 'PUT' }).then(() => {
this.setEach('read', true);
this.get('model').forEach(n => n.set('read', true));
});
},

View File

@ -21,7 +21,7 @@
{{#if model}}
{{d-button title='user.dismiss_notifications_tooltip'
class='btn dismiss-notifications'
action="resetNew"
action=(action "resetNew")
label='user.dismiss_notifications'
icon='check'
disabled=allNotificationsRead}}