Topic: Where to calculate the rowspan
I am a newbe on rails. I read some documentation and I like the concept of Models, Views, and Controllers, but I am still a bit confused where to put which code.
Therefore I would like to ask an advice on the following situation:
I have a database table that looks like this:
Col1 Col2 Col3
ABC 123 XXX
ABC 123 YYY
ABC 789 TTT
EFD 678 MMM
I would like to produce the following html table:
I do not know on forehand how many columns in the rows are identical, in other words, I need to calculate the rowspan during the processing of the table. My question is what is the best approach? Should I put all the code for this in the View?
Please help me.
Thanx for your answer