Rest with ruby objects?

Hello Everyone,

Does anybody know how to use rest to deliver non-active record models
in rails 2.3.2. I am using flex as a front end for a huge data set
and I end to crunch the numbers on the back end before passing arrays
of counts through to the visualisation.

Any help greatly appreciated.

Thanks for your reply.

How would I get a count without passing an entire array of objects?

j

johnmcauley@gmail.com wrote:

Thanks for your reply.

How would I get a count without passing an entire array of objects?

Call #size on the array before passing it? Or am I misunderstanding
what you want?

j

Best,

Hey Marmen,

Thanks for your reply.
I want to run several queries aganist a database. These queries will
return arrays of objects contistong of value, key
pairs. These objects are not activerecord objects, and basically are
values I'll use to create graphs in flex.
This was very easy with aws. I could use structs, query, build the
array and serve with aws. But aws is gone.
I'm having trouble doing this with rest.
Do I need a count controller, and use list with some parameter to
specify the query?
And if I use a simple ruby object I run into XML serialization
problems.

Have any suggestions on how to go about this?

Thanks again,

j

Have you had a look at http://restfulx.github.com?

I haven't but I will.

Thanks,
J