Class: Decidim::InitiativesType

Inherits:
ApplicationRecord show all
Includes:
HasResourcePermission, HasUploadValidations, TranslatableResource
Defined in:
decidim-initiatives/app/models/decidim/initiatives_type.rb

Overview

Initiative type.

Instance Method Summary collapse

Methods included from HasUploadValidations

#attached_uploader, #maximum_avatar_size, #maximum_upload_size

Instance Method Details

#allow_resource_permissions?Boolean

Returns:

  • (Boolean)

40
41
42
# File 'decidim-initiatives/app/models/decidim/initiatives_type.rb', line 40

def allow_resource_permissions?
  true
end

#allowed_signature_types_for_initiativesObject


34
35
36
37
38
# File 'decidim-initiatives/app/models/decidim/initiatives_type.rb', line 34

def allowed_signature_types_for_initiatives
  return %w(online offline any) if any_signature_type?

  Array(signature_type.to_s)
end

#mounted_admin_engineObject


44
45
46
# File 'decidim-initiatives/app/models/decidim/initiatives_type.rb', line 44

def mounted_admin_engine
  "decidim_admin_initiatives"
end

#mounted_paramsObject


48
49
50
# File 'decidim-initiatives/app/models/decidim/initiatives_type.rb', line 48

def mounted_params
  { host: organization.host }
end