Hi,

Anyone can helps to display a summary list instead of a details list.

Here is my code;

recgroup = eval(tablename.fieldname) if !tablename.fieldname.nil?

puts  recgroup[:textgroup] + recgroup[:countgroup].inject(0) {|sum,
room| sum + room.length}.to_s + '; ' + recgroup[:countgroup].length.to_s
if !recgroup.nil?


It was displays as a details;

textdata1 1 1
textdata2 1 2
textdata1 2 2


But I need to display as a summary;


textdata1 3 3
textdata2 1 2


Thanks!
-- 
Posted via http://www.ruby-forum.com/.

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

Reply via email to