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
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.
Sponsor our Newsletter | Privacy Policy | Terms of Service | Remote Ruby Jobs