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
--
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.