I have model that includes a serializer that is defined via the Rails API gem. It works when I do a respond_with(response) but not when I do render :json => response. The output is different and it doesn't perform the serializer (I think it just does to_json instead).

Does anyone know how to extract the to_json data (or hash data) of the model without doing a rendering? I would like to include the extracted data as subdata within the response.

Any ideas?

share|improve this question
feedback

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
or
required, but never shown
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.