Files
grecia/app/components/layout/cookies_consent/banner_component.rb
taitus 018b00cd6e Allow managing versions of cookies consent
This can be useful when adding a new cookie or making
modifications that require asking the user again.
2025-01-23 17:16:57 +01:00

14 lines
288 B
Ruby

class Layout::CookiesConsent::BannerComponent < Layout::CookiesConsent::BaseComponent
delegate :cookies, to: :helpers
def render?
super && cookies_consent_unset?
end
private
def cookies_consent_unset?
cookies["cookies_consent_#{version_name}"].blank?
end
end