def linked_resources_for(resource, type, link_name)
      linked_resources = resource.linked_resources(type, link_name).group_by { |linked_resource| linked_resource.class.name }

      safe_join(linked_resources.map do |klass, resources|
        resource_manifest = klass.constantize.resource_manifest
        content_tag(:div, class: "section") do
          i18n_name = "#{resource.class.name.demodulize.underscore}_#{resource_manifest.name}"
          content_tag(:h3, I18n.t(i18n_name, scope: "decidim.resource_links.#{link_name}"), class: "section-heading") +
            render(partial: resource_manifest.template, locals: { resources: resources })
        end
      end)
    end
def linked_resources_for(resource, type, link_name)
      linked_resources = resource.linked_resources(type, link_name).group_by { |linked_resource| linked_resource.class.name }

      safe_join(linked_resources.map do |klass, resources|
        resource_manifest = klass.constantize.resource_manifest
        content_tag(:div, class: "section") do
          i18n_name = "#{resource.class.name.demodulize.underscore}_#{resource_manifest.name}"
          content_tag(:h3, I18n.t(i18n_name, scope: "decidim.resource_links.#{link_name}"), class: "section-heading") +
            render(partial: resource_manifest.template, locals: { resources: resources })
        end
      end)
    end
Renders a collection of linked resources for a resource.

 resource  - The resource to get the links from.
 type      - The String type fo the resources we want to render.
 link_name - The String name of the link between the resources.

 Example to render the proposals in a meeting view:

  linked_resources_for(:meeting, :proposals, "proposals_from_meeting")

 Returns nothing.