I am working in a simple Emberjs application where I am using the following versions:
DEBUG: -------------------------------
DEBUG: Ember : 1.3.2+pre.25108e91
DEBUG: Ember Data : 1.0.0-beta.6
DEBUG: Handlebars : 1.2.1
DEBUG: jQuery : 1.11.0
DEBUG: -------------------------------
Suppose I have the following model:
class App.Event extends DS.Model
startDate: DS.attr 'date', { defaultValue: new Date}
endDate: DS.attr 'date', { defaultValue: new Date}
guests: DS.attr 'number'
client: DS.belongsTo 'client'
room: DS.belongsTo 'room'
eventType: DS.belongsTo 'eventType'
eventServices: DS.hasMany 'eventService'
eventPayments: DS.hasMany 'eventPayment'
everytime I try to save an instance of this model like this:
event.save()
Emberjs/Ember Data is serializing my date fields like this. Example, if my start date was:
2014-02-12 21:27:52 -0500
emberjs would serialize it like this:
1392258472591
Does anybody knows why is doing that? My rails backend does not recognize this format.
Any help would be appreciated!