I have a rails 3 model with a Date field. when i render the model as json, the date field is returning the date and time. It should only return the date, because this is a Date field not a DateTime field.
how do I make my model return only the date for my Date fields, when rendering to json?
i've tried overriding the as_json methods of TimeWithZone and Date, as talked about in these 2 questions, but that's not working for me.
fwiw, we're using ruby 1.9.2, rails 3.0.7, mongodb and mongoid 2.0.2. I know our version of mongo/mongoid does not support a "Date" field type, specifically. it gets stored as a UTC time. i'm trying to get the data to look like it's just a date, on the way out to the client via json.