<div class="small-12 column" >
  <% if @search_terms && @resources.any? %>
    <div class="alert-box radius warning">
      <p class="note-marked">
        <%= t("shared.suggest.#{resource_name}.found",
            count: @resources.count,
            query: @search_terms)%>
      </p>

      <ul>
        <% @resources.limit(@limit).each do |resource| %>
          <li><%= link_to resource.title, resource %></li>
        <% end %>
      </ul>

      <% if @resources.count > @limit %>
        <p class="note-marked">
          <%= t("shared.suggest.#{resource_name}.message",
              count: @resources.count,
              query: @search_terms,
              limit: @limit) %>
          <%= link_to t("shared.suggest.#{resource_name}.see_all"),
                      polymorphic_url(resource_model, search: @search_terms)%>
        </p>
      <% end %>

    </div>
  <% end %>
</div>
<div class="small-12 column" >
  <% if @search_terms && @resources.any? %>
    <div class="alert-box radius warning">
      <p class="note-marked">
        <%= t("shared.suggest.#{resource_name}.found",
            count: @resources.count,
            query: @search_terms)%>
      </p>

      <ul>
        <% @resources.limit(@limit).each do |resource| %>
          <li><%= link_to resource.title, @resource_path_method.present? ? send(@resource_path_method, resource) : resource  %></li>
        <% end %>
      </ul>

      <% if @resources.count > @limit %>
        <p class="note-marked">
          <%= t("shared.suggest.#{resource_name}.message",
              count: @resources.count,
              query: @search_terms,
              limit: @limit) %>
          <%= link_to t("shared.suggest.#{resource_name}.see_all"),
                      polymorphic_url(resource_model, search: @search_terms)%>
        </p>
      <% end %>

    </div>
  <% end %>
</div>
Allow the use of a custom path method in suggest partial
Allow the use of a custom path method in suggest partial

The path to investments in lists is generated with a helper
method named namespaced_budget_investments_path. This allows
its use in the shared suggest partial. Also, as nested
resource in routes, link_to("title", investments) fails.
