From: atbusbook@... Date: 2006-09-19T04:26:21+09:00 Subject: Re: do .. unless Devin Mullins wrote: > Josselin wrote: > > > > is there any better way to write that : > > > > if !params[:qaddress].nil? > > cond_b = EZ::Where::Condition.new :properties do > > ... > > end > > end > > > > using a do.. unless ? something like that ?? > > > > cond_b = EZ::Where::Condition.new :properties do > > ... > > end unless params[:qaddress].nil? > Well, the unless modifier works here -- if qaddress is nil, cond_b is > set to nil. Here's another way: > cond_b = if params[:qaddress] > EZ::Where::Condition.new :properties do > ... > end > end > > Fnord begin # do stuff end while false will be done once