Using Ember-Data with the RestAdapter, I'm able to successfully get data from my server. I display this data using Handlebar's {{input}} helper. The use case is relatively simple: I want to allow users to update the data, and have the modifications persisted back to the server.
Here are my questions:
1) When I modify the data shown on the screen, does the Ember-Data "store" get updated behind the scene automatically as soon as I tab out of a particular field?
2) In monitoring server incoming messages, I don't see an http "PUT" request from Ember when I tab out of a field, or when I change route. So how do I go about triggering an update to the server?
follow-up comments
Per Amir's answer below, I got the RestAdapter to send a "PUT" request to the server by using "this.get('model').save();". But RestAdapter didn't send the hasMany records. So if my model definition is as shown below (please note that both 'item' and 'strat' have IDs, which are not shown in the model definition):
App.Item = DS.Model.extend({
itemName: DS.attr('string'),
strategy: DS.belongsTo('strat')
});
App.Strat = DS.Model.extend({
stratName: DS.attr('string'),
items: DS.hasMany('item',{async:true})
});
"this.get('model').save()" triggered a "PUT" request to the server, but the JSON sent only contained stratName. How do I get RestAdapter to send the hasMany record?