Tim W. wrote:
> How does one format a time when serializing an active record object?

I'm not sure I quite follow your question, but I do know that the 
to_json method as implemented in Rails uses the same date and time 
formats as does to_xml.

Example:
"2009-08-19T13:03:07Z"

> Server side somehow or leave it up to client side javascript?

In the case of to_json the serialization of date and time gets formatted 
as a string on the server-side. I assume if you were to use that data in 
JavaScript (client-side) you would need to parse the string date/time 
format to a JavaScript Date object. I'm sure you could find a JS code 
snippet to handle that.
-- 
Posted via http://www.ruby-forum.com/.

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to