Open nullnull opened 6 years ago
Hello! I'm not sure as I didn't touch jbuilder parsing code for a long time and didn't plan to do so in near future. But if you find out that it is possible and will be compatible with old behavior - we can try to fix it
Thank you for issue!
Hi. I found that
json.cache!
was not working when I was using jbuilder template withgon.jbuilder
. I found this error message:undefined method controller' for #<StaffsController:0x007f984fb67440> Did you mean? controller_path
The error comes from this line. https://github.com/rails/jbuilder/blob/master/lib/jbuilder/jbuilder_template.rb#L35I think this problem will be fixed by changing the argument
controller
to right one. (controller
is equal to@context
onJbuilderTemplate
) https://github.com/gazay/gon/blob/master/lib/gon/jbuilder/parser.rb#L69Is it hard to replace it? And is there other way to use
json.cache!
when usinggon.jbuilder
?Thanks.