diff --git a/app/controllers/rounds/new.js b/app/controllers/rounds/new.js index 16ce85e..6595a3d 100644 --- a/app/controllers/rounds/new.js +++ b/app/controllers/rounds/new.js @@ -38,7 +38,7 @@ var RoundsNewController = Ember.Controller.extend({ createRound: function() { var _this = this; - this.set('model.course', this.get('model.course.content')); + this.get('model').save().then(function(round) { _this.controllerFor('application').set('currentRound', round); _this.controllerFor('application').set('currentHole', '1'); diff --git a/app/templates/courses/new.hbs b/app/templates/courses/new.hbs index 70f0664..704f9d6 100644 --- a/app/templates/courses/new.hbs +++ b/app/templates/courses/new.hbs @@ -19,7 +19,11 @@ - {{view "select" content=stateAbbreviations value=model.state required=true classNames="form-control"}} + {{#x-select value=model.state required=true id='state' classNames='form-control'}} + {{#each stateAbbreviations as |state|}} + {{#x-option value=state}}{{state}}{{/x-option}} + {{/each}} + {{/x-select}}
Can't see the course you're looking for? Why not diff --git a/package.json b/package.json index bf346fb..f251a0a 100644 --- a/package.json +++ b/package.json @@ -40,6 +40,7 @@ "ember-data": "1.13.15", "ember-disable-proxy-controllers": "^1.0.1", "ember-export-application-global": "^1.0.4", + "emberx-select": "2.2.1", "express": "^4.8.5", "glob": "^4.0.5" } diff --git a/tests/.jshintrc b/tests/.jshintrc index 2a171aa..0ab53df 100644 --- a/tests/.jshintrc +++ b/tests/.jshintrc @@ -13,6 +13,7 @@ "exists", "fillIn", "click", + "select", "keyEvent", "triggerEvent", "find", diff --git a/tests/test-helper.js b/tests/test-helper.js index e6cfb70..35461bf 100644 --- a/tests/test-helper.js +++ b/tests/test-helper.js @@ -1,4 +1,6 @@ import resolver from './helpers/resolver'; +import registerSelectHelper from './helpers/register-select-helper'; +registerSelectHelper(); import { setResolver } from 'ember-qunit';