Skip to content

Instantly share code, notes, and snippets.

@marcoow
Created August 8, 2013 13:41
Show Gist options
  • Save marcoow/6184657 to your computer and use it in GitHub Desktop.
Save marcoow/6184657 to your computer and use it in GitHub Desktop.
App.SessionDestroyController = Ember.Controller.extend({
logout: function() {
var self = this;
$.ajax({
url: '/session',
type: 'DELETE'
}).always(function(response) {
App.Session.setProperties({
authToken: '',
authAccountId: ''
});
self.transitionToRoute('session.new');
});
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment