Module: Decidim::ScopesHelper

Included in:
ApplicationHelper
Defined in:
decidim-core/app/helpers/decidim/scopes_helper.rb

Overview

A Helper to render scopes, including a global scope, for forms.

Defined Under Namespace

Classes: Option

Instance Method Summary collapse

Instance Method Details

#has_visible_scopes?(resource) ⇒ Boolean

Check whether the resource has a visible scope or not.

Returns boolean.

Returns:

  • (Boolean)


11
12
13
# File 'decidim-core/app/helpers/decidim/scopes_helper.rb', line 11

def has_visible_scopes?(resource)
  current_participatory_process.scopes_enabled? && !current_participatory_process.scope.present? && resource.scope.present?
end