Pastie now auto-senses if line-wrap is a bad or good idea. Feedback?
## mark a section (Learn more)
This paste will be private.
# try this def index ps = params[:prospect] || {} cond = EZ::Where::Condition.new :prospects do firstname =~ "%#{ps[:firstname]}%" lastname =~ "%#{ps[:lastname]}%" city =~ "%#{ps[:city]}%" province == ps[:province] zipcode =~ "%#{ps[:zipcode]}%" end @prospects = Prospect.find :all, :conditions => cond.to_sql respond_to do |format| format.html format.xml { render :xml => @prospects.to_xml } end end
From the Design Piracy series on my blog: