From: Charlie Bowman Date: 2006-03-03T04:25:02+09:00 Subject: Re: cleaner Ruby in a rails view --=-vTSG3gWAsTmXvHyNeNZe Content-Type: text/plain Content-Transfer-Encoding: 7bit I think that is the best answer so far....but that seems to go against everything that makes ruby so great. Something just doesn't feel right about creating an object just to say that it's empty. I guess I should ask this on the rails list, but I like this list much better :) , Is is possible to add methods to the nil class in only the views? If so, that would be awsome! > > > > Probably the best thing is to do whatever's necessary in the > > controller to make sure the template can coast. So you could, for > > example, put list.items (or whatever) in @items, making sure in > > advance that it's an empty array if there aren't any. > Charlie Bowman Programmer Castle Branch Inc. --=-vTSG3gWAsTmXvHyNeNZe--