diff --git a/app/controllers/organisation_relationships_controller.rb b/app/controllers/organisation_relationships_controller.rb index 50f256d81..4b81d3422 100644 --- a/app/controllers/organisation_relationships_controller.rb +++ b/app/controllers/organisation_relationships_controller.rb @@ -79,7 +79,7 @@ class OrganisationRelationshipsController < ApplicationController end def remove_housing_provider - @target_organisation_id = target_organisation_id + @target_organisation_id = target_organisation.id end def delete_housing_provider diff --git a/app/views/organisation_relationships/remove_housing_provider.html.erb b/app/views/organisation_relationships/remove_housing_provider.html.erb index dae769475..301392753 100644 --- a/app/views/organisation_relationships/remove_housing_provider.html.erb +++ b/app/views/organisation_relationships/remove_housing_provider.html.erb @@ -1,20 +1,19 @@ -<%= form_with url: housing_providers_organisation_path(target_organisation: @target_organisation), method: "delete", local: true do |f| %> +<%= form_with url: housing_providers_organisation_path(target_organisation_id: @target_organisation.id), method: "delete", local: true do |f| %> <% if current_user.support? %> <%= render partial: "organisations/headings", locals: { main: @organisation.name, sub: nil } %> <%= render SubNavigationComponent.new(items: secondary_items(request.path, @organisation.id)) %>