Closed antifun closed 9 years ago
Yes, I'm very sorry, the #render
patch was just a, well, patch, I knew it's gonna cause problems later.
Could you add a test to https://github.com/apotonick/roar-rails/blob/master/test/render_test.rb and implement it in https://github.com/apotonick/roar-rails/blob/master/lib/roar/rails/controller_additions.rb#L66 ? Thanks :heart:
This might be an expectation problem, but the following does not work as I thought it would. I want to use my representer to return an object as JSON, and following (old) conventions, if a callback is specified in my request, I assume I am to return a JSONP-suitable call of that function with my JSON-represented thing. However, I can't get the roar-rails rendering paths to do this. I have to resort to explicitly calling the representer and then using
render
rather than any of therespond_with
fanciness that roar-rails patches.I think the patched
render
needs to pass all the remaining options besidesrepresent_with
through tosuper
, but my attempt to have it do so was not sufficient to combine the behaviors such that option 2 above was successful. If that's the right track, I can keep pursuing it.