- 
      
 - 
        
Save jamesdixon/58e68f49e02a2e0d8daf748daf41e315 to your computer and use it in GitHub Desktop.  
Revisions
- 
        
jamesdixon revised this gist
Mar 31, 2017 . 2 changed files with 2 additions and 18 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 @@ -9,21 +9,5 @@ Currencies Dropdown options=currencies optionLabelPath="name" includeBlank=true update=(action (mut model.currency2)) }} 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 @@ -15,6 +15,6 @@ "ember-testing": "2.8.0" }, "addons": { "ember-one-way-controls": "2.0.0" } }  - 
        
mvuckovic revised this gist
Oct 14, 2016 . 1 changed file with 0 additions and 7 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,3 @@ <h2>Expected behaviour</h2> Selected Currency:  - 
        
mvuckovic created this gist
Oct 14, 2016 .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 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,7 @@ import Model from "ember-data/model"; import attr from "ember-data/attr"; import { belongsTo, hasMany } from "ember-data/relationships"; export default Model.extend({ name: 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 @@ -0,0 +1,9 @@ import Model from "ember-data/model"; import attr from "ember-data/attr"; import { belongsTo, hasMany } from "ember-data/relationships"; export default Model.extend({ name: attr("name"), currency: belongsTo(), currency2: 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 @@ -0,0 +1,15 @@ import Ember from 'ember'; export default Ember.Route.extend({ model() { this.store.createRecord('currency', { id: 1, name: "USD" }); this.store.createRecord('currency', { id: 2, name: "EUR" }); this.store.createRecord('currency', { id: 3, name: "YEN" }); return this.store.createRecord('product'); }, setupController(controller, model) { controller.set('model', model); controller.set('currencies', this.store.peekAll('currency')); } }); 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,36 @@ <h1>Welcome to {{appName}}</h1> <br> <br> {{outlet}} <br> <br> <h2>Expected behaviour</h2> Selected Currency: {{model.currency2.name}} <br> Currencies Dropdown {{one-way-select model.currency2 options=currencies optionLabelPath="name" includeBlank=true promptText="Select a currency" update=(action (mut model.currency2)) }} <h2>Unexpected behaviour</h2> Selected Currency: {{model.currency.name}} <br> Currencies Dropdown {{one-way-select model.currency options=currencies optionLabelPath="name" includeBlank=true promptText="Select a currency" update=(action (mut model.currency)) }} 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,20 @@ { "version": "0.10.5", "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.8.0", "ember-data": "2.8.0", "ember-template-compiler": "2.8.0", "ember-testing": "2.8.0" }, "addons": { "ember-one-way-controls": "1.1.1" } }