From 5763daf821c0729bb34592be9fc6e73977c39cfd Mon Sep 17 00:00:00 2001 From: xsrust Date: Thu, 11 Jan 2018 15:18:35 +0000 Subject: [PATCH] updated iterator on admin_template page to remove nil access errors --- app/views/templates/admin_template.html.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/templates/admin_template.html.erb b/app/views/templates/admin_template.html.erb index 75564de633..fc7cbfeeb1 100644 --- a/app/views/templates/admin_template.html.erb +++ b/app/views/templates/admin_template.html.erb @@ -36,7 +36,7 @@ <%= render partial: 'templates/show_phases_sections', locals: {phase: phase[:data], phase_hash: phase, template: @template, current: @current} %> <% end %> <% else %> - <% (1..@hash[:template][:phases].length).each do |phase_no| %> + <% @hash[:template][:phases].keys.sort.each do |phase_no| %> <% phase = @hash[:template][:phases][phase_no] %>