natgeo/modules-activitysnippet — pull request #20 by lsvx (2014-07-21 20:13:54+00:00)
Title: Ls/add callbacks

This branch finishes adding support for the business requirements from MIE-1205, that is, if the service goes down while the user is logged out, then the inactive callbacks should not be fired on a click. This was implemented by calling `@fetch` before inactive callbacks are fired and only firing the callbacks if the fetch succeeds. Under the hood, the this works by adding success and error callbacks to all of the XHR requests. You can now do:
````coffeescript
@save
success: (data) -> console.log "Wooohoo: " + data
error: (error) -> console.log "Aw man: " + error
````