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
14 lines
276 B
Ruby
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
|