[Rails] ActiveSupport and XML conversions help needed
by Chris Williams other posts by this author
Aug 13 2007 4:30PM messages near this date
|
[Rails] First JRuby App on GlassFish Screencast & Blog
I am using the to_xml method on my AR object. The type for one of my
fields is timestamp and the XML looks like the following.
<created-at type="timestamp"> Thu Aug 09 02:23:14 UTC 2007</created-at>
I want the format to be the xmlschema format. I am looking at the
XML_TYPE_NAMES in conversions.rb and I don't see timestamp listed. I am
new to Ruby/Rails and trying to figure out the correct way to expand the
hash to include timestamp as an option. Also, how do I find out what
the type name would be for the type timestamp? Would it be TimeStamp or
Timestamp? The standard to_xml is good enough for me except this one
issue. I would rather not define a rxml.
Any suggestions would be great!
Thanks
CW
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Ta
lk" group.
To post to this group, send email to rubyonrails-talk@[...].com
To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe@[...].com
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---
|