js-cookie

14 views
Skip to first unread message

fugee ohu

unread,
Jan 11, 2020, 1:48:31 AM1/11/20
to Ruby on Rails: Talk
I installed js-cookie using `yard add js-cookie and put this line in application.js
require("js-cookie")
but when I use this code in my channel:
console.log(Cookies.get('current_user_id'))
I get the error Cookies is not defined
Message has been deleted

fugee ohu

unread,
Jan 11, 2020, 2:04:10 AM1/11/20
to Ruby on Rails: Talk
After placing <%= javascript_pack_tag 'js-cookie', 'data-turbolinks-track': 'reload'   %>  in application.html.erb I get the error that it hasn't been included in manifest.js 
Reply all
Reply to author
Forward
0 new messages