gazay / gon

Your Rails variables in your JS
MIT License
3.05k stars 184 forks source link

You can't use Gon public methods for storing data #226

Closed rastislavcore closed 7 years ago

rastislavcore commented 7 years ago

I have following error on gon v. 5.2.3 You can't use Gon public methods for storing data

Problematic code: gon.current_user = { sn: current_user.sn }

bhaveshf-cuelogic commented 7 years ago

@raisty : You must be having some public method named current_user somewhere in your code. Are you using devise gem ?

rastislavcore commented 7 years ago

You are absolutely true. The problem is with public method named current_user