Hello I have a strange problem with this code:
<%unless (@students.empty? and params[:commit].nil?) %> <%="test"%> <%= render :partial => 'results' %> <% end %> Even though in some cases @students.empty? returns false and params [:commit].nil? returns true (or the opposite), it displays the test and the render area. I put before and after the code the <%=params[:commit].nil?%> and < %...@students.empty?%> so I can see it (it shows false and true or the opposite and always it shows the render area and the test). I also tried && but it was the same problem. The only way it worked was this: <% unless @students.empty? %> <% unless params[:commit].nil?%> <%="test"%> <%= render :partial => 'results' %> <% end %> <% end %> So why "and" - "&&" doesn't work? I tried every combination with () or without ()... Thank you --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk@googlegroups.com To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---