def search @results =Search.find(params[:query]) case @results when 0 then render :action=> "no_results" when 1 then render :action=> "show" when 2..10 then render :action=> "show_many" end end def search @results =Search.find(params[:query]) case @results when 0 then render :action=> "no_results" when 1 then render :action=> "show" when 2..10 then render :action=> "show_many" end end