diff --git a/app/views/locations/mobility_standards.html.erb b/app/views/locations/mobility_standards.html.erb index 15a6b8fad..d4844c0d6 100644 --- a/app/views/locations/mobility_standards.html.erb +++ b/app/views/locations/mobility_standards.html.erb @@ -4,7 +4,7 @@ <%= govuk_back_link( text: "Back", href: params[:referrer] == "check_answers" ? scheme_location_check_answers_path(@scheme, @location) : scheme_location_type_of_unit_path(@scheme, @location), - ) %> + ) %> <% end %> <%= form_for(@location, method: :patch, url: scheme_location_mobility_standards_path(@scheme, @location, referrer: params[:referrer])) do |f| %> diff --git a/app/views/locations/name.html.erb b/app/views/locations/name.html.erb index 5f69868c8..aa9f43b4c 100644 --- a/app/views/locations/name.html.erb +++ b/app/views/locations/name.html.erb @@ -3,8 +3,12 @@ <% content_for :before_content do %> <%= govuk_back_link( text: "Back", - href: params[:referrer] == "check_answers" ? scheme_location_check_answers_path(@scheme, @location) : params[:referrer] == "details" ? scheme_location_path(@scheme, @location) : scheme_location_postcode_path(@scheme, @location), - ) %> + href: if params[:referrer] == "check_answers" + scheme_location_check_answers_path(@scheme, @location) + else + params[:referrer] == "details" ? scheme_location_path(@scheme, @location) : scheme_location_postcode_path(@scheme, @location) + end, + ) %> <% end %> <%= form_for(@location, method: :patch, url: scheme_location_name_path(@scheme, @location, referrer: params[:referrer])) do |f| %> diff --git a/app/views/locations/postcode.html.erb b/app/views/locations/postcode.html.erb index a1102bed0..0690e3254 100644 --- a/app/views/locations/postcode.html.erb +++ b/app/views/locations/postcode.html.erb @@ -4,7 +4,7 @@ <%= govuk_back_link( text: "Back", href: params[:referrer] == "check_answers" ? scheme_location_check_answers_path(@scheme, @location) : scheme_locations_path(@scheme), - ) %> + ) %> <% end %> <%= form_for(@location, method: :patch, url: scheme_location_postcode_path(@scheme, @location, referrer: params[:referrer])) do |f| %> diff --git a/app/views/locations/type_of_unit.html.erb b/app/views/locations/type_of_unit.html.erb index 74322a35a..7befd6f2e 100644 --- a/app/views/locations/type_of_unit.html.erb +++ b/app/views/locations/type_of_unit.html.erb @@ -4,7 +4,7 @@ <%= govuk_back_link( text: "Back", href: params[:referrer] == "check_answers" ? scheme_location_check_answers_path(@scheme, @location) : scheme_location_units_path(@scheme, @location), - ) %> + ) %> <% end %> <%= form_for(@location, method: :patch, url: scheme_location_type_of_unit_path(@scheme, @location, referrer: params[:referrer])) do |f| %> diff --git a/app/views/locations/units.html.erb b/app/views/locations/units.html.erb index 9118a40f8..e212abd27 100644 --- a/app/views/locations/units.html.erb +++ b/app/views/locations/units.html.erb @@ -4,7 +4,7 @@ <%= govuk_back_link( text: "Back", href: params[:referrer] == "check_answers" ? scheme_location_check_answers_path(@scheme, @location) : scheme_location_name_path(@scheme, @location), - ) %> + ) %> <% end %> <%= form_for(@location, method: :patch, url: scheme_location_units_path(@scheme, @location, referrer: params[:referrer])) do |f| %>