Fix #6 Sort hashes in templates

Sorts the hashes before printing them in templates.
This commit is contained in:
Xavier L 2016-07-11 08:17:46 -04:00 committed by GitHub
parent 3aae015036
commit 3a5b8a12e6

View File

@ -42,14 +42,14 @@ scope <%= @ldap_search_scope %>
<% if @ldap_filters.length > 0 -%> <% if @ldap_filters.length > 0 -%>
# Custom search filters # Custom search filters
<% @ldap_filters.each do |map, filter| -%> <% @ldap_filters.sort.each do |map, filter| -%>
filter <%= map %> <%= filter %> filter <%= map %> <%= filter %>
<% end -%> <% end -%>
<% end -%> <% end -%>
<% if @ldap_maps.length > 0 -%> <% if @ldap_maps.length > 0 -%>
# Custom maps # Custom maps
<% @ldap_maps.each do |key, value| -%> <% @ldap_maps.sort.each do |key, value| -%>
map <%= key %> <%= value %> map <%= key %> <%= value %>
<% end -%> <% end -%>
<% end -%> <% end -%>