On Sat, 9 Sep 2006, 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

tr{ tr @item.foo } unless @item.foo.to_s.empty?

-a
-- 
what science finds to be nonexistent, we must accept as nonexistent; but what
science merely does not find is a completely different matter... it is quite
clear that there are many, many mysterious things.
- h.h. the 14th dalai lama