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
33 34 35 |
# File 'app/models/decidim/initiatives_type_scope.rb', line 33 def global_scope? decidim_scopes_id.nil? end |
#scope_name ⇒ Object
37 38 39 40 41 |
# File 'app/models/decidim/initiatives_type_scope.rb', line 37 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 |
#taxonomy_name ⇒ Object
43 44 45 |
# File 'app/models/decidim/initiatives_type_scope.rb', line 43 def taxonomy_name taxonomy&.name.presence || { I18n.locale.to_s => I18n.t("decidim.initiatives.unavailable_scope") } end |