vendredi 27 mars 2015

How to Create A Multidimensional Record in Ember

I'm relatively new with Ember.


I'm trying to save a multidimensional record so that I can easily have observables set to appropriately populate some select menus.


I've tried using square brackets, circle brackets, and dot notation to try to save the record, but I can't figure out how to set it up properly.


Here's what I was trying



import Ember from 'ember';

export default Ember.ObjectController.extend({
actions: {
publishCity: function() {
var newCity = this.store.createRecord('city', {
model.country: this.get('country'),
model.province: this.get('province'),
model.city : this.get('city'),
});
newCity.save();
}
}
});




Aucun commentaire:

Enregistrer un commentaire