> -----Original Message-----
> From: list-bounce / example.com 
> [mailto:list-bounce / example.com] On Behalf Of arnaud stageman
> Sent: Tuesday, June 13, 2006 10:33 AM
> To: ruby-talk ML
> Subject: ugly ruby code...
> 
> I would like to seperate racks already added in the showed 
> room and the others
> [...]

This looks like active record, right?

what about

def show
  @room = Room.find(params[:id])
  @racks_room = Rack.find(:all, :conditions => "room_id = #{@room.id}")
  @free_racks = Rack.find(:all, :conditions => "room_id != #{@room.id}")
end

cheers

Simon