From: dblack@... Date: 2007-02-09T00:09:54+09:00 Subject: Re: DRY or not ... Hi -- On Thu, 8 Feb 2007, Devin Mullins wrote: > Josselin wrote: >> if params[:new_title].blank? >> params[:new_title] = nil >> elsif params[:new_title] == "null" >> params[:new_title] = "" >> end > params[:new_title] = ("" if params[:new_title] == "null") That doesn't embody the same logic, though. If params[:new_title] is neither blank? nor "null", the original code doesn't change it. David -- Q. What is THE Ruby book for Rails developers? A. RUBY FOR RAILS by David A. Black (http://www.manning.com/black) (See what readers are saying! http://www.rubypal.com/r4rrevs.pdf) Q. Where can I get Ruby/Rails on-site training, consulting, coaching? A. Ruby Power and Light, LLC (http://www.rubypal.com)