Skip to content

Instantly share code, notes, and snippets.

@zeroDivisible
Last active December 19, 2015 00:59
Show Gist options
  • Save zeroDivisible/5872338 to your computer and use it in GitHub Desktop.
Save zeroDivisible/5872338 to your computer and use it in GitHub Desktop.
DS.RESTAdapter.registerTransform('raw', {
deserialize: function(serialized) {
return serialized;
},
serialize: function(deserialized) {
return deserialized;
}
});
App.Movie = DS.Model.extend({
embed_url: DS.attr('string'),
title: DS.attr('string'),
url: DS.attr('string'),
duration: DS.attr('number'),
record_id: DS.attr('number'),
date_added: DS.attr('date'),
thumbnail: DS.attr('raw'),
first_thumb: function() {
return this.get('thumbnail')[0];
}.property('thumbnail')
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment