Force index_files to Array before iteration in templates

This commit is contained in:
Daniel Black 2013-12-19 15:51:59 +10:00
parent 520eb23ffd
commit f338f304c5
3 changed files with 3 additions and 3 deletions

View file

@ -32,7 +32,7 @@ server {
}
<% end -%>
<% if @index_files -%>
index <% @index_files.each do |i| %> <%= i %><% end %>;
index <% Array(index_files).each do |i| %> <%= i %><% end %>;
<% end -%>
access_log <%= @access_log_real %>;

View file

@ -18,7 +18,7 @@
autoindex on;
<% end -%>
<% if @index_files -%>
index <% @index_files.each do |i| %> <%= i %><% end %>;
index <% Array(index_files).each do |i| %> <%= i %><% end %>;
<% end -%>
<% if defined? @auth_basic -%>
auth_basic "<%= @auth_basic %>";

View file

@ -21,7 +21,7 @@ server {
auth_basic_user_file "<%= @auth_basic_user_file %>";
<% end -%>
<% if @index_files -%>
index <% @index_files.each do |i| %> <%= i %><% end %>;
index <% Array(index_files).each do |i| %> <%= i %><% end %>;
<% end -%>
access_log <%= @ssl_access_log %>;