16
I'm updating my rails 2 apps to rails 3 and find that the use of 'render :text' does not behave the same anymore.
@results is an array. In my controller:
render :text => "<ul>#{@results}</ul>"
It's returning the whole array as a string rather than iterating through each value:
<ul>
["
<li>Steve</li>
", "
<li>John</li>
"]
</ul>
Worked fine in Rails 2.x but not in 3. How do I fix this?
I'm expecting a result of:
<ul>
<li>Steve</li>
<li>John</li>
</ul>