Posts Tagged ‘ActiveRecord’

Using ActiveRecord’s to_xml to produce custom xml including deep level associations

Wednesday, September 10th, 2008 by Glenn Gentzke

ActiveRecord provides a powerful method to all its records called to_xml. Most web developers using RoR should be familiar with its usage and hopefully use it for their simple xml production needs. But what do you do when you need to produce xml that is selective, includes associations, or contains custom tags? There are many ways to manipulate to_xml’s output and I’ll explain a few below.
(more…)