def scopes_picker_field_tag(name, value, id: nil)
      picker_options = {
        id: id || sanitize_to_id(name),
        class: "picker-single",
        name: name
      }

      prompt_params = yield(nil)
      selected_scopes = value ? Decidim::Scope.where(id: value) : []
      scopes = selected_scopes.map { |scope| [scope, yield(scope)] }

      template = ""
      template += render("decidim/scopes/scopes_picker_input",
                         picker_options: picker_options,
                         prompt_params: prompt_params,
                         scopes: scopes,
                         checkboxes_on_top: true)
      template.html_safe
    end
def scopes_picker_field_tag(name, value, id: nil)
      picker_options = {
        id: id || sanitize_to_id(name),
        class: "picker-single",
        name: name
      }

      prompt_params = yield(nil)
      selected_scopes = value ? Decidim::Scope.where(id: value) : []
      scopes = selected_scopes.map { |scope| [scope, yield(scope)] }

      template = ""
      template += render("decidim/scopes/scopes_picker_input",
                         picker_options: picker_options,
                         prompt_params: prompt_params,
                         scopes: scopes,
                         checkboxes_on_top: true)
      template.html_safe
    end
A custom helper to include a scope picker field without requiring a form
 object

 name - The input name
 value - The input value as a scope id
 options - The set of options to send to the field
           :id - The id to generate for the element (optional)

 Returns a scopes picker tag to be included in an html template.