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.

On Jan 3, 5:10 pm, Ooh_Gravy <[email protected]> wrote:
> OK, thanks.  What I wanted to do was this:
>
>         <ul>
>                 <% @recipe.steps.each do |step| %>
>                         <li><%= step.id %>: <%= step.step %></li>
>                 <% end %>
>         </ul>
>

--

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