Module: Decidim::Core::ParticipatorySpaceResourceableInterface

Includes:
Api::Types::BaseInterface
Defined in:
decidim-core/lib/decidim/api/interfaces/participatory_space_resourceable_interface.rb

Overview

This interface represents a participatorySpaceResourceable object. It create and array of linked participatory spaces for each registered manifest

Instance Method Summary collapse

Instance Method Details

#linked_participatory_spacesObject


19
20
21
22
# File 'decidim-core/lib/decidim/api/interfaces/participatory_space_resourceable_interface.rb', line 19

def linked_participatory_spaces
  Decidim::ParticipatorySpaceLink.where("name like 'included_%' and ((from_id=:id and from_type=:type) or (to_id=:id and to_type=:type))",
                                        id: object.id, type: object.class.name)
end