Hi,
newbie question(i guess) a = Bookings.find(:all, :conditions => [3.days.ago]) a = [id : 1, departure : 'AMS', arrival => 'NY'],[id : 2, departure : 'AMS', arrival => 'BCN'],[id : 3, departure : 'AMS', arrival => 'BKK'],[id : 4, departure : 'AMS', arrival => 'BKK'] ect. The value of the key departure and arrival is dynamic based on table(3000 combinations) and the bookings I want to find the bookings and count the arrival and departure(s). I the case of the code above, i want the following output. departure = AMS > total = 5 arrival = BCN > total = 1 arrival = NY > total = 1 arrival = BKK > total = 2 How can i do this Grtz..remco -- 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 -~----------~----~----~----~------~----~------~--~---

