Ooh_Gravy wrote:
> So answering my own question, is this ok or is there a cleaner way to
> do it?
> 
>   <ul>
>     <% index = 1 %>
>     <% @recipe.steps.each do |step| %>
>       <li><%= index %>: <%= step.step %></li>
>       <% index += 1 %>
>     <% end %>
>   </ul>
> 
> Thanks a lot.


You can use the OL (ordered list ) tag instead of UL tag (unordered 
list).

http://www.w3schools.com/TAGS/tag_ol.asp



>   <ol>
>     <% @recipe.steps.each do |step| %>
>       <li>: <%= step.step %></li>
>     <% end %>
>   </ol>


Simone


.
-- 
Posted via http://www.ruby-forum.com/.

--

You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.


Reply via email to