Skip to content

Instantly share code, notes, and snippets.

@alexspeller
Last active December 23, 2015 11:38
Show Gist options
  • Save alexspeller/6629465 to your computer and use it in GitHub Desktop.
Save alexspeller/6629465 to your computer and use it in GitHub Desktop.
App.Bands = Ember.ObjectProxy.extend();
App.Bands.reopenClass({
all: function() {
return $.getJSON("http://domain.com/api/v1/bands?format=jsonp&callback=?").then(function (response) {
return response.map(function (band) {
return App.Bands.create({content: band})
});
});
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment