Module: AdminBarHelper

Included in:
Www::AdminBarController
Defined in:
app/helpers/admin_bar_helper.rb

Overview

Renders the WWW admin bar based on the apex-domain admin presence cookie set
by CRM (see AdminPresence). The bar appears anywhere this helper is mixed
in, without requiring the user to log into WWW separately — they just need
an active CRM session as an @warmlyyours.com admin.

Instance Method Summary collapse

Instance Method Details

#admin_bar_payloadObject



12
13
14
# File 'app/helpers/admin_bar_helper.rb', line 12

def admin_bar_payload
  @admin_bar_payload ||= AdminPresence.decode(cookies)
end

#admin_bar_visible?Boolean

Returns:

  • (Boolean)


8
9
10
# File 'app/helpers/admin_bar_helper.rb', line 8

def admin_bar_visible?
  admin_bar_payload.present?
end