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
I set up a gon variable for checking if current user is available in controller. gon.watch.has_current_user = current_user.present?
I open a page (with current user presents) and duplicate that page to a new browser window.
I logged out in one page and call gon.watch('has_current_user'), then call alert(gon.has_current_user in the console. The variable was updated from true to false successfully.
Now I called the same two methods in the page I had not logged out. I assume that the variable must be checked and updated again by gon.watch and become false, too. However, the current_user still existed there.
Why?
The text was updated successfully, but these errors were encountered:
I set up a gon variable for checking if current user is available in controller.
gon.watch.has_current_user = current_user.present?
I open a page (with current user presents) and duplicate that page to a new browser window.
I logged out in one page and call
gon.watch('has_current_user')
, then callalert(gon.has_current_user
in the console. The variable was updated from true to false successfully.Now I called the same two methods in the page I had not logged out. I assume that the variable must be checked and updated again by gon.watch and become false, too. However, the current_user still existed there.
Why?
The text was updated successfully, but these errors were encountered: