Created
May 7, 2020 14:45
-
-
Save alexdiliberto/378a41b728ba6c95777d6041151697f3 to your computer and use it in GitHub Desktop.
Revisions
-
alexdiliberto revised this gist
May 7, 2020 . 1 changed file with 5 additions and 5 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,11 +1,11 @@ import DS from 'ember-data'; export default DS.RESTSerializer.extend({ // normalizeArrayResponse() { // let res = this._super(...arguments); // console.log('normalized array response:', res); // return res; // } }); -
williamhaley revised this gist
Jan 4, 2018 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -2,6 +2,6 @@ import Ember from 'ember'; export default Ember.Route.extend({ model() { return this.get('store').findAll('cart-item', { include: 'products' }); } }); -
williamhaley revised this gist
Jan 4, 2018 . 1 changed file with 0 additions and 6 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,6 +0,0 @@ -
williamhaley revised this gist
Jan 4, 2018 . 3 changed files with 4 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -3,5 +3,6 @@ import attr from "ember-data/attr"; import { belongsTo, hasMany } from "ember-data/relationships"; export default Model.extend({ cart: attr('string'), }); This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -3,4 +3,6 @@ import attr from "ember-data/attr"; import { belongsTo, hasMany } from "ember-data/relationships"; export default Model.extend({ name: attr(''), skuid: attr(''), }); This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -3,7 +3,6 @@ {{#each model as |item|}} <li>{{item.id}}</li> <ul> <li>{{item.product.id}}</li> <ul> <li>{{item.product.name}}</li> -
williamhaley revised this gist
Jan 4, 2018 . 1 changed file with 6 additions and 6 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,13 +1,13 @@ <h1>Welcome to {{appName}}</h1> <ul> {{#each model as |item|}} <li>{{item.id}}</li> <ul> <li>{{item.dateAdded}}</li> <li>{{item.product.id}}</li> <ul> <li>{{item.product.name}}</li> <li>{{item.product.skuid}}</li> </ul> </ul> {{/each}} -
williamhaley revised this gist
Jan 4, 2018 . 5 changed files with 73 additions and 46 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,47 +1,64 @@ export default function() { window.server = this; this.get('/cartItems', function (schema, request) { return { "cart-items": [ { "cart": "0048f8cc-ef50-11e7-8337-76502ffc62f3", "id": "ROVE949352B", "personalization": [], "prices": { "price": 74.95, "totalPrice": 74.95 }, "product": 4464, "quantity": 1, "skuid": "ROVE949352B", "variantCodes": [], "variantData": [] }, { "cart": "0048f8cc-ef50-11e7-8337-76502ffc62f3", "id": "BLK4226", "personalization": [], "prices": { "origprice": 0, "price": 60, "totalPrice": 60 }, "product": 4502, "quantity": 1, "skuid": "BLK4226", "variantCodes": [], "variantData": [] } ], "products": [ { "id": 4464, "images": { "image": "tristan-irish-watch.jpg", }, "name": "Watch - Gold Plated Watch", "prices": { "price": 74.95 }, "skuid": "ROVE949352B" }, { "id": 4502, "images": { "image": "BLK4226.jpg" }, "name": "Serving Bowl", "prices": { "origprice": 0, "price": 60 }, "skuid": "BLK4226" } ] } }); }; This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,14 @@ import Model from "ember-data/model"; import attr from "ember-data/attr"; import { belongsTo, hasMany } from "ember-data/relationships"; export default Model.extend({ cart: belongsTo('cart'), product: belongsTo('product', { async: true }), skuid: attr('string'), quantity: attr('number'), personalization: attr(''), variantCodes: attr(''), variantData: attr(''), prices: attr('') }); This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -3,7 +3,5 @@ import attr from "ember-data/attr"; import { belongsTo, hasMany } from "ember-data/relationships"; export default Model.extend({ }); This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -3,6 +3,4 @@ import attr from "ember-data/attr"; import { belongsTo, hasMany } from "ember-data/relationships"; export default Model.extend({ }); This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -2,6 +2,6 @@ import Ember from 'ember'; export default Ember.Route.extend({ model() { return this.get('store').findAll('cart-item'); } }); -
williamhaley revised this gist
Jan 4, 2018 . 2 changed files with 7 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -3,4 +3,6 @@ import attr from "ember-data/attr"; import { belongsTo, hasMany } from "ember-data/relationships"; export default Model.extend({ name: attr('string'), skuid: attr('string'), }); This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -4,8 +4,11 @@ <li>{{savedItem.id}}</li> <ul> <li>{{savedItem.dateAdded}}</li> <li>{{savedItem.product.id}}</li> <ul> <li>{{savedItem.product.name}}</li> <li>{{savedItem.product.skuid}}</li> </ul> </ul> {{/each}} </ul> -
williamhaley revised this gist
Jan 4, 2018 . 1 changed file with 6 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,11 @@ <h1>Welcome to {{appName}}</h1> <ul> {{#each model as |savedItem|}} <li>{{savedItem.id}}</li> <ul> <li>{{savedItem.dateAdded}}</li> <li>{{savedItem.product}}</li> <li>{{savedItem.user}}</li> </ul> {{/each}} </ul> -
williamhaley revised this gist
Jan 4, 2018 . 2 changed files with 12 additions and 0 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,6 @@ import Model from "ember-data/model"; import attr from "ember-data/attr"; import { belongsTo, hasMany } from "ember-data/relationships"; export default Model.extend({ }); This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,6 @@ import Model from "ember-data/model"; import attr from "ember-data/attr"; import { belongsTo, hasMany } from "ember-data/relationships"; export default Model.extend({ }); -
williamhaley revised this gist
Jan 4, 2018 . 1 changed file with 4 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -3,4 +3,7 @@ import attr from "ember-data/attr"; import { belongsTo, hasMany } from "ember-data/relationships"; export default Model.extend({ user: belongsTo('user'), product: belongsTo('product', { async: true }), dateAdded: attr('number') }); -
williamhaley revised this gist
Jan 4, 2018 . 2 changed files with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,7 +1,7 @@ export default function() { window.server = this; this.get('/saveditems', function (schema, request) { return { "saveditems": [ { This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -2,6 +2,6 @@ import Ember from 'ember'; export default Ember.Route.extend({ model() { return this.get('store').findAll('saveditem'); } }); -
williamhaley renamed this gist
Jan 4, 2018 . 1 changed file with 0 additions and 0 deletions.There are no files selected for viewing
File renamed without changes. -
williamhaley revised this gist
Jan 4, 2018 . No changes.There are no files selected for viewing
-
williamhaley revised this gist
Jan 4, 2018 . 1 changed file with 2 additions and 2 deletions.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,10 +1,10 @@ import DS from 'ember-data'; export default DS.RESTSerializer.extend({ normalizeArrayResponse() { let res = this._super(...arguments); console.log('normalized array response:', res); return res; } -
williamhaley revised this gist
Jan 4, 2018 . 2 changed files with 12 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,11 @@ import DS from 'ember-data'; export default DS.RESTSerializer.extend({ normalize() { let res = this._super(...arguments); console.log('normalized:', res); return res; } }); This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,6 +1,6 @@ <h1>Welcome to {{appName}}</h1> <ul> {{#each model as |savedItem|}} <li>{{savedItem.id}}</li> {{/each}} </ul> -
williamhaley created this gist
Jan 4, 2018 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,5 @@ import DS from 'ember-data'; export default DS.RESTAdapter.extend({ }); This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,5 @@ import Ember from 'ember'; export default Ember.Controller.extend({ appName: 'Ember Twiddle' }); This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,47 @@ export default function() { window.server = this; this.get('/savedItems', function (schema, request) { return { "saveditems": [ { "dateAdded": 1514914371, "id": "f51bf2b8-efe2-11e7-8337-76502ffc62f3", "product": 4502, "user": "me" }, { "dateAdded": 1514440889, "id": "8c3a7f96-eb94-11e7-8337-76502ffc62f3", "product": 1312, "user": "me" } ], "products": [ { "id": 4502, "images": { "image": "BLK4226.jpg", }, "name": "Serving Bowl", "prices": { "origprice": 0, "price": 60 }, "skuid": "BLK4226" }, { "id": 1312, "images": { "image": "GC689.jpg", }, "name": "Classic Cross", "prices": { "price": 29.95 }, "skuid": "JDSGC689GCB" } ] }; }); }; This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,6 @@ import Model from "ember-data/model"; import attr from "ember-data/attr"; import { belongsTo, hasMany } from "ember-data/relationships"; export default Model.extend({ }); This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,7 @@ import Ember from 'ember'; export default Ember.Route.extend({ model() { return this.get('store').findAll('saved-item'); } }); This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,6 @@ <h1>Welcome to {{appName}}</h1> <ul> {{#each model as |savedItem|}} {{/each}} </ul> This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,25 @@ { "version": "0.13.0", "ENV": { "ember-cli-mirage": { "enabled": true } }, "EmberENV": { "FEATURES": {} }, "options": { "use_pods": false, "enable-testing": false }, "dependencies": { "jquery": "https://cdnjs.cloudflare.com/ajax/libs/jquery/1.11.3/jquery.js", "ember": "2.16.2", "ember-template-compiler": "2.16.2", "ember-testing": "2.16.2" }, "addons": { "ember-data": "2.16.3", "ember-cli-mirage": "0.4.1" } }