tags:

views:

44

answers:

1

How do I obtain a reference to the current element in the iteration?

{{#my_array}}
    <p>{{__what_goes_here?__}}</p>
{{/my_array}}

I hope I am just overlooking the obvious.

A: 

I walked away from my code for a bit and remembered that Ruby is duck typed. Since my array was of strings, all I needed was:

{{#my_array}}
    <p>{{to_s}}</p>
{{/my_array}}

I'll leave this question here in the hopes to save somebody else some time.

Jeremy