Alex Gaziev
Alex Gaziev
Hello! Interesting case! Yeah, gon jbuilder now is not really dynamic and fully compatible. I think we can try to do something like done here https://github.com/gazay/gon/blob/master/lib/gon/jbuilder.rb#L61. But I'm not sure...
That is strange. In each request it calls Gon.clear which clear current gon data. Can you check with gon version 5.0.2?
Thank you! Yes, I think one of possible solutions is to create middleware like in request_store. But also I think we can simply check `wrong_gon_request?` in `include_gon` helper here -...
Problem is not solved yet as because of specific of jbuilder's rendering process I had to write own parser for its templates. Right now I don't have time and need...
I don't know the current situation, but when I added it, there was no explicit parser/renderer/engine included. So you can't do as in rabl, for example, `re = Rabl::Engine.new...; re.render`....
In Rails 5 will be rendering instrument that allow to throw away all Gon::Jbuilder::Parser logic and just render jbuilder template (https://medium.com/evil-martians/new-feature-in-rails-5-render-views-outside-of-actions-2fc1181e86a8)
It will call double render error if you use it in controller
Thank you for issue! Unfortunately I haven't touch rails 4 because of scope of my current work. I'll try to dig into by myself when I get some time but...
I can't reproduce this on new rails 4 application. Helper is working for me. Can someone provide simple app which reproduce this issue please?