From: Jigar Gosar Date: 2008-02-22T00:07:52+09:00 Subject: Re: Code Reduction Cool, thanks. The "if v" can be removed, cause if the key exists than there is no problem in rendering its value. Thanks a lot, that was a really quick reply. I just love ruby, cause so much can be expressed in so less. Arlen Cuss wrote: > Hey, > > If you call your CSS class for a `notice' flash NoticeMessage isntead of > just Message, you can make it simple like this: > > <% flash.each do |k, v| %> > <% if v %> >
> > <%= v %> > >
> <% end %> > <% end %> > > Cheers, > Arlen. -- Posted via http://www.ruby-forum.com/.