From 49d1d55b9dc654a549a40bfe2ed08278dbfbab1d Mon Sep 17 00:00:00 2001 From: JG Date: Tue, 5 Jul 2022 14:52:16 +0100 Subject: [PATCH] correct page when errros --- app/controllers/locations_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/locations_controller.rb b/app/controllers/locations_controller.rb index f28fcef6a..53874988c 100644 --- a/app/controllers/locations_controller.rb +++ b/app/controllers/locations_controller.rb @@ -31,7 +31,7 @@ class LocationsController < ApplicationController if @location.update(location_params) location_params[:add_another_location] == "Yes" ? redirect_to(new_location_path) : redirect_to(scheme_check_answers_path(@scheme, anchor: "locations")) else - render :details, status: :unprocessable_entity + render :edit, status: :unprocessable_entity end end