ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> ruby-rails
ruby-rails
[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
-~----------~----~----~----~------~----~------~--~---

Privacy Policy | Email Opt-out | Feedback | Syndication
© 2004 ActiveState, a division of Sophos All rights reserved