Class: Decidim::InitiativesTypeScope
- Inherits:
-
ApplicationRecord
- Object
- ApplicationRecord
- Decidim::InitiativesTypeScope
- Defined in:
- app/models/decidim/initiatives_type_scope.rb
Instance Method Summary collapse
Instance Method Details
#global_scope? ⇒ Boolean
28 29 30 |
# File 'app/models/decidim/initiatives_type_scope.rb', line 28 def global_scope? decidim_scopes_id.nil? end |
#scope_name ⇒ Object
32 33 34 35 36 |
# File 'app/models/decidim/initiatives_type_scope.rb', line 32 def scope_name return { I18n.locale.to_s => I18n.t("decidim.scopes.global") } if global_scope? scope&.name.presence || { I18n.locale.to_s => I18n.t("decidim.initiatives.unavailable_scope") } end |