In my .html.erb file, I have a lot of lines of information to display. I am accomplishing this with a simple: (using blueprint css)
<% for event in @user.events %>
<div class="span-5 border">Descriptor:</div> <div class="span-5 last"><%=h event.foo%></div><br/>
<% end %>
How can I make it so that I can call some function that would render the information part and I would pass it just the Descriptor (a string literal) and the method for event ("foo" in this case).
I'm new to rails and I think this could be accomplished using a partial render, but I'm not entirely sure.
Thanks