diff --git a/app/models/scheme.rb b/app/models/scheme.rb index 5ac48b310..41f757d15 100644 --- a/app/models/scheme.rb +++ b/app/models/scheme.rb @@ -214,7 +214,6 @@ class Scheme < ApplicationRecord if confirmed == true required_attributes.any? do |attribute| if self[attribute].blank? - errors.add :base errors.add attribute.to_sym self.confirmed = false end diff --git a/config/locales/en.yml b/config/locales/en.yml index c139d9c31..5110730db 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -65,8 +65,6 @@ en: invalid: "Select if this scheme provides for another client group" arrangement_type: invalid: "Select who provides the support services used by this scheme" - base: - invalid: "You must answer all the required questions for this scheme" location: attributes: startdate: diff --git a/spec/requests/schemes_controller_spec.rb b/spec/requests/schemes_controller_spec.rb index ecf244761..2e853a922 100644 --- a/spec/requests/schemes_controller_spec.rb +++ b/spec/requests/schemes_controller_spec.rb @@ -586,7 +586,7 @@ RSpec.describe SchemesController, type: :request do it "does not allow the scheme to be confirmed" do expect(response).to have_http_status(:unprocessable_entity) - expect(page).to have_content(I18n.t("activerecord.errors.models.scheme.attributes.base.invalid")) + expect(page).to have_content(I18n.t("activerecord.errors.models.scheme.attributes.managing_organisation_id.invalid")) end end