diff --git a/config/routes/publish.rb b/config/routes/publish.rb index dda2996333..199781def7 100644 --- a/config/routes/publish.rb +++ b/config/routes/publish.rb @@ -127,9 +127,18 @@ get 'continue' end - resource :accredited_provider, on: :member, only: %i[new], controller: 'courses/accredited_provider', path: 'accredited-provider' do - get 'continue' - get 'search_new' + constraints(::Constraints::PartnershipFeature.new(:off)) do + resource :accredited_provider, on: :member, only: %i[new], controller: 'courses/accredited_provider', path: 'accredited-provider' do + get 'continue' + get 'search_new' + end + end + + constraints(::Constraints::PartnershipFeature.new(:on)) do + resource :ratifying_provider, on: :member, only: %i[new], controller: 'courses/ratifying_provider', path: 'ratifying-provider' do + get 'continue' + get 'search_new' + end end resource :student_visa_sponsorship, on: :member, controller: 'courses/student_visa_sponsorship', path: 'student-visa-sponsorship' do get 'continue' @@ -234,9 +243,17 @@ get '/apprenticeship', on: :member, to: 'courses/apprenticeship#edit' put '/apprenticeship', on: :member, to: 'courses/apprenticeship#update' - get '/accredited-provider', on: :member, to: 'courses/accredited_provider#edit' - put '/accredited-provider', on: :member, to: 'courses/accredited_provider#update' - get '/accredited-by', on: :member, to: 'courses/accredited_provider#show' + constraints(::Constraints::PartnershipFeature.new(:off)) do + get '/accredited-provider', on: :member, to: 'courses/accredited_provider#edit' + put '/accredited-provider', on: :member, to: 'courses/accredited_provider#update' + get '/accredited-by', on: :member, to: 'courses/accredited_provider#show' + end + + constraints(::Constraints::PartnershipFeature.new(:on)) do + get '/ratifying-provider', on: :member, to: 'courses/ratifying_provider#edit' + put '/ratifying-provider', on: :member, to: 'courses/ratifying_provider#update', as: :ratifying_provider_publish_provider_recruitment_cycle_course + get '/ratified-by', on: :member, to: 'courses/ratifying_provider#show' + end get '/provider', on: :member, to: 'courses/providers#show'