Reputation: 2363
I'm using the Slim template language (http://slim-lang.com/).
Can someone please tell me how to convert this ERB to be used in a friends.html.slim template?
data/people.yaml
friends:
- Tom
- Dick
- Harry
ERB
<ol>
<% data.people.friends.each do |f| %>
<li><%= f %></li>
<% end %>
</ol>
Upvotes: 1
Views: 628
Reputation: 160170
More a question than an answer, because I'm sort-of assuming you already did this:
ol
- for f in data.people.friends do
li = f
If that didn't work, please describe what you did try, and what didn't work.
Upvotes: 3