Active Record Associations Added to WebORB for Rails

It’s late and I’m lazy so I’m going to to do a copy and paste job (my favorite kind), from the Midnight Coders blog:

We’ve recently added a new feature to WebORB that allows native serialization of associations within active record models. This has been requested several times and now allows you to do things like (from the Rails documentation):

Person.find(1, :include => [ :account, :friends ])

…in your rails remote service and then in your Flex client you can very naturally peel off account or friends information directly from the person object that is returned.

var person:Object = event.result;
…person.name
…person.account.balance
…person.friends //(this will point to an array of friend objects)

This is really cool and brings the full power of Rails’ Active Records to Flash Remoting. No other Remoting solution has this feature not even CakeAMF for CakePHP/AMFPHP.

BTW WebORB now has a PHP version that supports AMF0 and AMF3, nice! (if you must use PHP). The Midnight Coders are releasing stuff left and right, most likely living up to their name to get all this stuff out :)

This entry was posted in Ruby on Rails. Bookmark the permalink. Post a comment or leave a trackback: Trackback URL.

Post a Comment

Your email is never published nor shared. Required fields are marked *

*
*

*
To prove you're a person (not a spam script), type the security word shown in the picture. Click on the picture to hear an audio file of the word.
Click to hear an audio file of the anti-spam word