From: Farrel Lifson Date: 2006-09-10T17:05:11+09:00 Subject: Re: Combine @item.foo.nil? || @item.foo.empty? ? On 08/09/06, Joe Ruby wrote: > I have code like this in my (Markaby) templates: > > tr do > td @item.foo > end unless (@item.foo.nil? || @item.foo.empty?) > > Is there a way to combine these two OR clauses into one? > > tr do > td @item.foo > end unless @item.foo.nil_or_empty? > > Thanks, > Joe > > -- > Posted via http://www.ruby-forum.com/. > > tr do td @item.foo end unless Array(@item).empty?