def decidim_paginate(collection, paginate_params = {})
      # Kaminari uses url_for to generate the url, but this doesn't play nice with our engine system
      # and unless we remove these params they are added again as query string :(
      default_params = {
        participatory_process_id: nil,
        component_id: nil
      }

      paginate collection, theme: "decidim", params: paginate_params.merge(default_params)
    end
def decidim_paginate(collection, paginate_params = {})
      # Kaminari uses url_for to generate the url, but this doesn't play nice with our engine system
      # and unless we remove these params they are added again as query string :(
      default_params = {
        participatory_process_id: nil,
        component_id: nil
      }

      paginate collection, theme: "decidim", params: paginate_params.merge(default_params)
    end
Displays pagination links for the given collection, setting the correct
 theme. This mostly acts as a proxy for the underlying pagination engine.

 collection - a collection of elements that need to be paginated
 paginate_params - a Hash with options to delegate to the pagination helper.