I am using active_model_serializers and ember.js. One of my models has a date attribute. In rails date attributes are serialized in the format of "YYYY-MM-DD".
The problem; when ember-data de-serializes the date using the javascript Date constructor it assumes an "incorrect" timezone.
*Incorrect is not the best word but it is incorrect because I want it to default to the current timezone. DS.Model date attribute parses date (YYYY-MM-DD) incorrectly
I am thinking the active_model_serializer should take the date attribute and convert it to iso8601 format.
Object.date.to_time_in_current_zone.iso8601
Is there a way to tell active_model_serializers how to serialize all date objects? Or should I be fixing the timezone issue in javascript?