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 written by
Alastair, posted on
September 8, 2006 at 1:29 am, filed under
Ruby on Rails. Bookmark the
permalink. Follow any comments here with the
RSS feed for this post.
or leave a trackback:
Trackback URL.
© Copyright 2006 - 2012 Alastair Dawson
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.