diff options
-rw-r--r-- | app/views/terraform_http_backend/show.html.erb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/app/views/terraform_http_backend/show.html.erb b/app/views/terraform_http_backend/show.html.erb index 9a99d52..764c172 100644 --- a/app/views/terraform_http_backend/show.html.erb +++ b/app/views/terraform_http_backend/show.html.erb @@ -28,7 +28,7 @@ License along with the GOV.UK Mini Environment Admin. If not, see <% historical_states = TerraformState .where(state_id: @state.state_id) - .order(:id) + .order(id: :asc) .to_a %> @@ -76,7 +76,7 @@ License along with the GOV.UK Mini Environment Admin. If not, see </thead> <tbody> - <% historical_states.each_with_index do |historical_state, index| %> + <% historical_states.to_enum.with_index.reverse_each do |historical_state, index| %> <% current = (@state.id == historical_state.id) %> <tr> |