On 13 Jul 2009, at 02:45, MilesTogoe wrote:
> but now I want to loop thru makes to get available cars
> makes.each do |m|
> avail_cars += m.cars # error here
> end
I'd probably do
avail_cars = makes.map { |m| m.cars }.flatten
Ashley
--
http://www.patchspace.co.uk/
http://www.linkedin.com/in/ashleymoran
http://aviewfromafar.net/
http://twitter.com/ashleymoran
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"DataMapper" 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/datamapper?hl=en
-~----------~----~----~----~------~----~------~--~---