From 3eedb2aede34165d7a34fa0dc77ed6c919f7dcb9 Mon Sep 17 00:00:00 2001 From: Phil Hughes Date: Fri, 24 Mar 2017 12:41:42 +0000 Subject: Refactored the user callout class Instead of the JS being in charge of the HTML, the HAML now handles it. The HAML can then check the cookie & show it needed. It also allows the HAML access to the paths so we don't have to pass that through. Closes #29955 --- app/helpers/application_helper.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'app/helpers') diff --git a/app/helpers/application_helper.rb b/app/helpers/application_helper.rb index a3213581498..e5b811f3300 100644 --- a/app/helpers/application_helper.rb +++ b/app/helpers/application_helper.rb @@ -306,4 +306,8 @@ module ApplicationHelper def active_when(condition) 'active' if condition end + + def show_user_callout? + cookies[:user_callout_dismissed] == 'true' + end end -- cgit v1.2.1