Exporting ActiveRecord objects into POROs

Posted by Lucas d. Prim on Stack Overflow See other posts from Stack Overflow or by Lucas d. Prim
Published on 2010-03-24T11:40:23Z Indexed on 2010/03/24 11:43 UTC
Read the original article Hit count: 164

Filed under:
|
|
|

Hello,

I'm developing a "script generator" to automatize some processes at work. It has a Rails application running on a server that stores all data needed to make the script and generates the script itself at the end of the process.

The problem I am having is how to export the data from the ActiveRecord format to Plain Old Ruby Objects (POROs) so I can deal with them in my script with no database support and a pure-ruby implementation.

I tought about YAML, CSV or something like this to export the data but it would be a painful process to update these structures if the process changes. Is there a simpler way?

Ty!

© Stack Overflow or respective owner

Related posts about ruby

Related posts about ruby-on-rails