Class: Decidim::OnboardingActionMessageCell

Inherits:
ViewModel
  • Object
show all
Includes:
ActiveLinkTo, ActiveLinkToHelper
Defined in:
app/cells/decidim/onboarding_action_message_cell.rb

Overview

This cell renders an announcement of pending onboarding action if exists for a user

The model is expected to be a user

Instance Method Summary collapse

Methods included from ActiveLinkToHelper

#is_active_link?

Instance Method Details

#showObject



15
16
17
18
19
20
21
22
23
24
# File 'app/cells/decidim/onboarding_action_message_cell.rb', line 15

def show
  return if is_active_link?(onboarding_path)
  return unless onboarding_manager.valid?
  return unless onboarding_manager.pending_action?
  return if authorization_status == :unauthorized
  return if pending_authorization_link_active?
  return if ephemeral_authorized?

  render :show
end