Files
grecia/app/components/layout/cookies_consent/banner_component.rb
taitus 1958a77842 Allow accept essential cookies from consent banner
Set cookie duration to 365 days based on the AEPD's cookie usage guidelines.

Note from the document: "Cookies with a duration of up to 24 months are
considered acceptable as long as they are periodically updated."
Reference: https://www.aepd.es/guias/guia-cookies.pdf
2025-01-23 16:48:53 +01:00

14 lines
276 B
Ruby

class Layout::CookiesConsent::BannerComponent < ApplicationComponent
delegate :cookies, to: :helpers
def render?
feature?(:cookies_consent) && cookies_consent_unset?
end
private
def cookies_consent_unset?
cookies["cookies_consent"].blank?
end
end