Files
nairobi/app/components/layout/cookies_consent/vendors_component.rb
taitus 7407c386a6 Render third party cookies in the management component
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 17:16:55 +01:00

12 lines
248 B
Ruby

class Layout::CookiesConsent::VendorsComponent < Layout::CookiesConsent::BaseComponent
delegate :cookies, :dom_id, to: :helpers
def render?
super && vendors.any?
end
def enabled?(vendor)
cookies[vendor.cookie] == "true"
end
end