Skip to content
forked from freego/eu_cookies

A Rails solution to the European Cookie Law issue

License

Notifications You must be signed in to change notification settings

dsawa/eu_cookies

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

EuCookies

Gem Version

A Rails solution to the European Cookie Law issue.

This will add a dismissable "cookies bar" and an optional link to a policy page.

Build Status Code Climate

Installation

Add this line to your application's Gemfile:

gem 'eu_cookies', '~> 1.1.0'

And then execute:

$ bundle

Run the installation generator:

$ bundle exec rails g eu_cookies:install

Then, just add this somewhere on you <body>:

<%= cookies_bar %>

NOTE: This gem imply that you have JQuery.

Configuration

On a initializer you can configure some things (defaults are shown here):

# false to remove the default internal link, a string to link an external page
EuCookies.display_policy = true
# true to treat page scroll as acceptance
EuCookies.use_scroll = false
# false to disable all the features
EuCookies.enabled = true

Styling

To quickly customize position and styles you can override some Sass variables, take a look to your app/assets/stylesheets/eu_cookies.scss file.

Supported languages

The cookies bar message is available in English, Croatian, Dutch, Estonian, French, German, Italian, Norwegian, Polish, Russian, Slovenian, Spanish and Swedish.

The full policy page is currently in english.

Turbolinks

Not supported, please use jquery.turbolinks gem.

Contributing

Bug reports and pull requests are welcome. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the Contributor Covenant code of conduct.

Credits

Originally based on https://github.com/infinum/cookies_eu

License

The gem is available as open source under the terms of the MIT License.

About

A Rails solution to the European Cookie Law issue

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • HTML 45.4%
  • Ruby 40.1%
  • CSS 11.5%
  • JavaScript 3.0%