Returning different represenations of the same resource based on some condition in API

Hey,

I was wondering if anybody has it all figured out :slight_smile:

Basically I need something similar that Facebook or Twitter are doing in
their API - if you make an unauthorized request for a resource you get
back
a “public” representation of it, if you make an authorized one you get
“private/full” representation. It would be awesome if it could be
integrated
somehow into a responder…

Cheers,
Szymon

I haven’t used it, but maybe checkout the acts_as_api gem.

Thanks! Looks like it’s exactly what I need.