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
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---