ember.js - Get an individual record using ember-model with 'find' -


i have app using ember-model , unable single model when passing other id find.

my code make more sense:

currentmembership: function() {   var mem = membership.find({ user_id: 1, organization_id: 1, limit: 1 });   return mem.get('firstobject'); }.property() 

i have tried using fetch no avail:

currentmembership: function() {   return membership.fetch({ user_id: 1, organization_id: 1, limit: 1 }).then(     function(results) {       return results.get('firstobject');     }   ); }.property() 

is there way can force response build off first object , return single model instead of recordarray?

you implement fetchone, not built ember model.


Comments

Popular posts from this blog

php - Calling a template part from a post -

Firefox SVG shape not printing when it has stroke -

How to mention the localhost in android -