So in rails we could find a record by name, id etc, similarly i want to do in ember without making a server request I have a model called person{id, name}. If i want to peek a record by id i do this:
this.get('store').peekRecord('person', id)
which gives me the record based on id, but now i want to peek a record with a particular name, i tried something like this:
this.get('store').peekRecord('person', {name: "testname"})
which dose not seem to work. i need a way peek a record using just the name
Aucun commentaire:
Enregistrer un commentaire