Reputation: 677
I'm new to middleman and ruby so the syntax is very unfamiliar. I have setup a simple list page and a dynamic article page. This all works fine, but how do i generate the dynamic URL in link_to?
My list page is at localhost/list/ And my dynamic article page should be localhost/list/1/ where the number is dynamic.
<% data.list.each do |b| %>
<%= link_to 'Read more', '/list/b.id.html' %>
<% end %>
How can I generate the dynamic URL?
Upvotes: 0
Views: 454