My controller contains:
@prefix = params[:asset_id]
where params[:asset_id] contains the subdirectory names like [downloads, company, brochure].
My view contains:
<ol class="breadcrumb">
<li><%= link_to 'Start', admin_assets_path %></li>
<% for item in @prefix.split("/") %>
<li> <%= link_to "/ #{item}", "" %></li>
<% end %>
</ol>
The result would look like following:
Start / downloads / company / brochure
My Problem here of course is that all of the breadcrumbs will be linked to the same following url:
http://localhost:3000/int/en/admin/assets/downloads%2Fcompany%2Fbrochure%2F/path
I want all of them be linked to their respective URL, e.g.:
downloads: http://localhost:3000/int/en/admin/assets/downloads%2F/path
company: http://localhost:3000/int/en/admin/assets/downloads%2Fcompany%2F/path
brochure: http://../en/admin/assets/downloads%2Fcompany%2Fbrochure%2F/path
How should be the logic to get every breadcrumb its own url?