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.

[email protected] wrote:

Hello Everyone,

Does anybody know how to use rest to deliver non-active record models
in rails 2.3.2.
[…]

Just set up a suitable controller (with RESTfully named methods), and
get the data from wherever you need it. Then send it out as JSON, XML,
or whatever you need.

REST is really all about naming and conceptual architecture. It doesn’t
have much directly to do with ActiveRecord.

Best,

Marnen Laibow-Koser
http://www.marnen.org
[email protected]

Thanks for your reply.

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

j

On Jun 10, 7:29 pm, Marnen Laibow-Koser <rails-mailing-l…@andreas-

[email protected] 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,

Marnen Laibow-Koser
http://www.marnen.org
[email protected]

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

On Jun 10, 10:03 pm, Marnen Laibow-Koser <rails-mailing-l…@andreas-

I haven’t but I will.

Thanks,
J

On Jun 11,

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

On Wed, Jun 10, 2009 at 6:24 PM, [email protected] <