You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Oct 11, 2019. It is now read-only.
Not sure if this is a gon issue or a wiselinks issue, but I will start here:
I'm using the gon gem to pass data from my controller into javascript. This is my controller:
def index
@users = User.all
gon.my_var = 'data'
end
After the corresponding page loads, if I break inside page:done in application.js, I don't see gon variable. If I do a normal browser refresh and bypass wiselinks, the variable does make it into javascript.
Is this just an incompatability between the two gems?
Thanks,
Joe
The text was updated successfully, but these errors were encountered:
I solved this by placing the <%= include_gon %> tag inside each view action (in my case, the index view) instead of placing it after the <%= javascript_include_tag 'application' %> tag and that fixed the issue.
Perhaps is has something to with the fact that I don't use the body tab for replacement? I wrap the yield inside a div as shown and replace using "yield-content":
Not sure if this is a gon issue or a wiselinks issue, but I will start here:
I'm using the gon gem to pass data from my controller into javascript. This is my controller:
After the corresponding page loads, if I break inside page:done in application.js, I don't see gon variable. If I do a normal browser refresh and bypass wiselinks, the variable does make it into javascript.
Is this just an incompatability between the two gems?
Thanks,
Joe
The text was updated successfully, but these errors were encountered: