Comments (11)
Same issue
from cookies_eu.
Same issue (ruby 2.6.6)
from cookies_eu.
I use Ruby 2.6.6 now, same issue. I don't use turbolinks.
I think it comes from the file '_consent_banner.html.erb' in views. There is this line to know if cookie bar is display or not :
<% if cookies && cookies['cookie_eu_consented'] != "true" %>
The problem is : 'cookies' variables is equal to a symbol :page (or :pages), so cookies['cookie_eu_consented'] is always equal to nil. How can I managed cookies to set cookies['cookie_eu_consented'] at true ? Is turbolinks mandatory ? I have seen this issue, but nothing works with me : #73
from cookies_eu.
Hello community,
i had the same problem, but i finally found a easy solution here:
https://discuss.rubyonrails.org/t/js-cookie/73808
terminal:
yarn add js-cookie
app/javascript/packs/application.js
window.Cookies = require("js-cookie")
from cookies_eu.
@frikkl it doesnt work for me tho ... I think the js-cookie is the completely different thing from cookies-eu
from cookies_eu.
Sorry guys, but I just can't reproduce it. Can someone pls share me a boilerplate where I can reproduce it? I'm now testing it on Rails 5 and 6, works fine :(
from cookies_eu.
Same issue. I just checked the browser console and found some error there.
Uncaught TypeError: Turbolinks.clearCache is not a function
from cookies_eu.
It seems you have a problem with turbolinks, not cookie bar. Can you share a code where you use .clearCache function ?
from cookies_eu.
I just integrated the gem. No external js is added for same.
Turbolinks.clearCache(), its already defined in gem's javascript file.
f497dd7#diff-8c3d240d047cd715dd245b524045d31bf6ec42867d418d145da6f471c8bfaa28.
Any suggestion to fix this, will be really helpful!
Thanks.
from cookies_eu.
Do you use turbolinks in you Rails app ? What rails version do you have ?
from cookies_eu.
I am using rails 4.2.6. Yes,Turbolinks used in my application.
from cookies_eu.
Related Issues (20)
- Add a screenshot to the README.md file HOT 6
- <%= render 'cookies_eu/consent_banner' %> doesn't render any view HOT 12
- jquery-turbolinks gem does not work with Rails 5+ HOT 1
- GDPR compliance HOT 9
- Overwrite text HOT 2
- pleas upgrade the gem
- Allow this to work with page caching HOT 2
- Make the view customizable HOT 3
- generator appended on last line not new line HOT 1
- Click on 'OK' in production does not do anything HOT 3
- Webpacker / Rails 6 HOT 8
- Add Arabic locale HOT 1
- Show cookie banner text in French HOT 1
- Button OK not working
- Does this disable turbolinks cache? HOT 1
- Rails 6, turbolinks 5 Cannot find module 'cookies_eu' HOT 4
- Press the Button in Production and Local Environment and the banner doesn't disappear
- Doesn't Work. Click "OK"... Nothing Happens HOT 10
- Support for persisting acknowledgement with a user account? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from cookies_eu.