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.
This commit is contained in:
Eduardo Martinez Echevarria
2017-06-11 13:28:16 +02:00
parent fd1c61ae61
commit 68f26ccfbf

View File

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