Class: Decidim::InitiativesType
- Inherits:
-
ApplicationRecord
- Object
- ApplicationRecord
- Decidim::InitiativesType
- Includes:
- HasResourcePermission, HasUploadValidations, Traceable, TranslatableResource
- Defined in:
- app/models/decidim/initiatives_type.rb
Overview
Initiative type.
Class Method Summary collapse
Instance Method Summary collapse
- #allow_resource_permissions? ⇒ Boolean
- #allowed_signature_types_for_initiatives ⇒ Object
- #mounted_admin_engine ⇒ Object
- #mounted_params ⇒ Object
Class Method Details
.log_presenter_class_for(_log) ⇒ Object
53 54 55 |
# File 'app/models/decidim/initiatives_type.rb', line 53 def self.log_presenter_class_for(_log) Decidim::Initiatives::AdminLog::InitiativesTypePresenter end |
Instance Method Details
#allow_resource_permissions? ⇒ Boolean
41 42 43 |
# File 'app/models/decidim/initiatives_type.rb', line 41 def true end |
#allowed_signature_types_for_initiatives ⇒ Object
35 36 37 38 39 |
# File 'app/models/decidim/initiatives_type.rb', line 35 def allowed_signature_types_for_initiatives return %w(online offline any) if any_signature_type? Array(signature_type.to_s) end |
#mounted_admin_engine ⇒ Object
45 46 47 |
# File 'app/models/decidim/initiatives_type.rb', line 45 def mounted_admin_engine "decidim_admin_initiatives" end |
#mounted_params ⇒ Object
49 50 51 |
# File 'app/models/decidim/initiatives_type.rb', line 49 def mounted_params { host: organization.host } end |