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
12 lines
248 B
Ruby
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
|