whats the syntax for next item jump on the loop
<% @ldap_entries.each do |entry| %> <% if entry[:mail] == '' %> <% next %>
does not seem to work ?
whats the syntax for next item jump on the loop
<% @ldap_entries.each do |entry| %> <% if entry[:mail] == '' %> <% next %>
does not seem to work ?
KTU wrote:
whats the syntax for next item jump on the loop
<% @ldap_entries.each do |entry| %> <% if entry[:mail] == '' %> <% next %>
does not seem to work ?
Hi KTU,
Not exactly sure what you want to do here, but if you are looking to "filter" your ldap_entries array you might want to use the "select" interator.
@ldap_entries.select{|e| entry[:mail] != ''}.each
Cheers, Aditya