From: arnaud stageman Date: 2006-06-13T18:01:51+09:00 Subject: Re: ugly ruby code... Great! It's working perfectly! Hummm Ruby :) Robin Stocker wrote: > arnaud stageman wrote: >> end > The above code could be replaced by this: > > @room_s_racks, @free_racks = @racks.partition { |rack| > rack.room_id == @room.id > } > > Partition can be very useful sometimes :) > > Regards, > Robin -- Posted via http://www.ruby-forum.com/.