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:
@@ -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>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user