Bonjour,

Pourquoi dans mon code

def index
   rtCriteria = ""
session[:list_search_criteria] = Hash.new if
session[:list_search_criteria] != ""

session[:list_search_criteria]["#{params[:criteria]}"] =
params[:criteria_texte] #unless params[:criteria_texte].blank?

session[:list_search_criteria].each {|key,value| rtCriteria = "
profiles.#{key} = '#{value}'" }


     if rtCriteria.blank?
       puts rtCriteria
     else
        #actions 1
 end

La condition se lance avant la boucle


Merci