From: arnaud stageman Date: 2006-06-13T20:52:45+09:00 Subject: Re: ugly ruby code... Robin Stocker wrote: > arnaud stageman wrote: >> @free_racks << rack >> end >> end >> end > > Hi again, > > Just some minor suggestions: > > You seem to use only instance variables. If you are not going to need > them later in views, I would prefer using local variables because they > go out of scope when the method finishes and don't clutter the object > with unnecessary variables. So, just replace @racks with racks. > > Replace the long Array.new with the shorter form []. Of course this is > just my opinion, but I find it easier to type and easier to read as it > gives you some kind of visual clue that there's an array involved. > Yes you're right I use now racks instead of @racks, thanks. > ...my 0.02 Swiss francs ;) Humm well in euro... Outch my head hurt :) -- Posted via http://www.ruby-forum.com/.