Ruby on Rails, Array to HTML table, controller or view?
Posted
by SooDesuNe
on Stack Overflow
See other posts from Stack Overflow
or by SooDesuNe
Published on 2010-04-19T02:45:46Z
Indexed on
2010/04/19
2:53 UTC
Read the original article
Hit count: 419
In my rails app the model is fetching some XML and returning an array. I want each array item (they are all text typed) to ultimately be a cell in an HTML table.
Does the logic of turning the array elements into the HTML table belong in the controller or the view?
Of course either will work, I'd like your thoughts on best practice.
© Stack Overflow or respective owner