I am having the same issue, it's returning empty {} when called from application.js but when print it in the controller, the variable gets assigned. I have this tag in application.html.haml '= include_gon :watch => true, :init => true', and simple assignment in controller gon.your_int = 5. I was working on my school project and was trying to see if someone can help me with this issue.
I am having the same issue, it's returning empty {} when called from application.js but when print it in the controller, the variable gets assigned. I have this tag in application.html.haml '= include_gon :watch => true, :init => true', and simple assignment in controller gon.your_int = 5. I was working on my school project and was trying to see if someone can help me with this issue.