gon.watch is broken
because gon.watch is not window variable, i can't access it. Currently, it returns undefinded. Let me know if you need PR from my side to fix this.
Hello! But gon.watch is not a variable - it is a function. https://github.com/gazay/gon/wiki/Usage-gon-watch
Yes, It is. And, the expected response should be the function i guess rather then undefined. isn't it happening with you ?
Little bit of background, we are using turbolinks (with rails 4) , i have included this in our body
= include_gon(:namespace => 'gt')
due to the nature of turbolinks.
Actually I see more problems with watch now - it ignores namespace option.
Anyway - how you think it can be solved?
oh yea. it does.
I wasn't aware of the code so I am not exactly fully aware of the problem and its scope. Tomorrow is sundae..I will have a look on it and see what I can do.
Looking at hight level i think we need to pass the namespace variable to those functions. That can be done easily. Since, with render_data method you are already rendering the javascript variable. We can just assign that variable to those javascript function.
are there any news on this? gon.watch is also undefined in my case.
gon.watch is still unaware and doesn't work when you use namespace.
In my ajax success callback I've updated gon.variable = ajax_result_parsed. It works! :)
@Alagaesia93, not sure how is that related?