From 3a5b8a12e6bc3175e177834ecdcf86436ed444cb Mon Sep 17 00:00:00 2001 From: Xavier L Date: Mon, 11 Jul 2016 08:17:46 -0400 Subject: [PATCH] Fix #6 Sort hashes in templates Sorts the hashes before printing them in templates. --- templates/nslcd.erb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/nslcd.erb b/templates/nslcd.erb index 7e369fe..16a221c 100644 --- a/templates/nslcd.erb +++ b/templates/nslcd.erb @@ -42,14 +42,14 @@ scope <%= @ldap_search_scope %> <% if @ldap_filters.length > 0 -%> # Custom search filters -<% @ldap_filters.each do |map, filter| -%> +<% @ldap_filters.sort.each do |map, filter| -%> filter <%= map %> <%= filter %> <% end -%> <% end -%> <% if @ldap_maps.length > 0 -%> # Custom maps -<% @ldap_maps.each do |key, value| -%> +<% @ldap_maps.sort.each do |key, value| -%> map <%= key %> <%= value %> <% end -%> <% end -%>