Class: Decidim::InitiativesType

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

Overview

Initiative type.

Instance Method Summary collapse

Instance Method Details

#allow_resource_permissions?Boolean

Returns:

  • (Boolean)

38
39
40
# File 'decidim-initiatives/app/models/decidim/initiatives_type.rb', line 38

def allow_resource_permissions?
  true
end

#allowed_signature_types_for_initiativesObject


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

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

  Array(signature_type.to_s)
end

#mounted_admin_engineObject


42
43
44
# File 'decidim-initiatives/app/models/decidim/initiatives_type.rb', line 42

def mounted_admin_engine
  "decidim_admin_initiatives"
end

#mounted_paramsObject


46
47
48
# File 'decidim-initiatives/app/models/decidim/initiatives_type.rb', line 46

def mounted_params
  { host: organization.host }
end