Hi guys,
I must be missing something obvious, but I can't get my head around
this:
In a view, if I do:
<% for i in 1..3 %>
<%= render :partial => 'test' %>
<% end %>
(note: _test just displays a string)
it works just fine. But if I move this into the corresponding helper:
<%= test_helper() %>
with (in the helper):
def test_helper
for i in 1..3
render :partial => 'test'
end
end
it displays in my page:
1..3
as if test_helper had returned the string "1..3".
Any idea what is wrong with this code?
Thanks a lot!
Peter