# Ember.Select via DS.belongsTo()

**URL:** <https://discuss.emberjs.com/t/ember-select-via-ds-belongsto/7718>\
**Category:** Ember Data\
**Created:** [April 4, 2015, 6:21pm UTC](https://discuss.emberjs.com/t/ember-select-via-ds-belongsto/7718 "2015-04-04T18:21:55Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![kgish](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.emberjs.com/kgish/32/13333_2.png) [@kgish](https://discuss.emberjs.com/u/kgish)\
**Post date:** [April 4, 2015, 6:21pm UTC](https://discuss.emberjs.com/t/ember-select-via-ds-belongsto/7718/1 "2015-04-04T18:21:56Z")

</div>

I have a model `city` defined like this:

```auto
// app/models/city.js
import DS from 'ember-data';

var City = DS.Model.extend({
    name: DS.attr('string'),
    province: DS.belongsTo('province', {async: true})
});

```

As well as a model `province` defined like this:

```auto
// app/models/province.js
import DS from 'ember-data';

var Province = DS.Model.extend({
    name: DS.attr('string')
});

```

I would like to be able to edit the city name or create a new one and select the provinces from a select box.

In my edit template I include the following:

```auto
{{!-- app/templates/cities/edit.hbs --}}
...
{{input type="text" class="form-control" id="name" value=model.name}}
...
{{input type="text" class="form-control" id="province" value=model.province.name}}

```

which works just fine for free form text editing, but for I want to replace the `{{input ... id="province" ... }}` with a selection box, something like this:

```auto
{{view "select" 
  content=???provinces???
  optionValuePath="content.id"
  optionLabelPath="content.name"
  value=model.province.name
}}

```

So that when I save the changes they are updated in the model also with the correct values.

How do I define the content `???provinces???` and how can I access an external provinces model outside of cities?
