Hi
you get agencies for each contract like
Contract.all.each { |c| c.agencies }
Here you get each contract information too For example
Contract.all.each do |c|
c.name #contract name
c.agencies
end
Can collect it to an array like
array = []
Contract.all.each do |c|
array << [c,c.agencies]
end
and can iterate the array now
Sijo
--
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
-~----------~----~----~----~------~----~------~--~---