Module: Decidim::ScopesHelper

Included in:
ApplicationHelper
Defined in:
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 'app/helpers/decidim/scopes_helper.rb', line 11

def has_visible_scopes?(resource)
  current_participatory_space.scopes_enabled? && current_participatory_space.scope.blank? && resource.scope.present?
end