Skip to content

Instantly share code, notes, and snippets.

View rob-long's full-sized avatar
🎯
Focusing

Rob Long rob-long

🎯
Focusing
View GitHub Profile
@rob-long
rob-long / adapters.application.js
Created July 27, 2019 18:43 — forked from chrism/adapters.application.js
Filtering Async hasMany Relationships
import DS from 'ember-data';
export default DS.RESTAdapter.extend({
namespace: 'api',
//coalesceFindRequests: true
});
@rob-long
rob-long / controllers.application.js
Last active July 28, 2019 06:25 — forked from Alonski/controllers.application.js
ASYNC relationships ROBLONG
import Controller from '@ember/controller';
import { reads } from '@ember/object/computed';
import objectRegularPromise from 'twiddle/object-regular-promise';
import objectPromiseProxy from 'twiddle/object-promise-proxy';
export default Controller.extend({
children: reads('model'),
actions: {
async clickChild(child) {
const parentAsRegularPromise = objectRegularPromise(child.parent);