Fork me on GitHub

Zeke Sikelianos

Mumblings from the code swamp. Find my more interesting online-ness at zeke.sikelianos.com.

Adding non-columnar data to Rails XML and JSON feeds

ActiveRecord offers handy to_xml and to_json methods for converting AR objects to XML or JSON format. Today I discovered that you can easily add values from model methods to the output, like so..

See Module::ActiveRecord::Serialization for more info.


Page 1 of 1