Tag Archives: to_xml

ActiveRecord from_json and from_xml

(Edited 2 Sept 2011: Please see instead the updated post here: ActiveRecord from_xml (and from_json) part 2.) Unless I’m missing something, the default rails from_json and from_xml methods don’t work with data that have associated objects. Here are routines that work for some simple examples I’ve tested. I placed this code in vendor/rails/activerecord/lib/active_record/base.rb within the [...]
Posted in rails | Also tagged , , , , | 5 Comments