do not display registration routes for signed up users

This commit is contained in:
Alex Turchyn
2023-08-25 23:54:55 +03:00
parent 9d90304d9a
commit 601c984f3f
+5 -3
View File
@@ -16,9 +16,11 @@ Rails.application.routes.draw do
devise_scope :user do
if Docuseal.multitenant?
resource :registration, only: %i[show], path: 'sign_up'
resource :registration, only: %i[create], path: 'new' do
get '' => :new, as: :new
unauthenticated do
resource :registration, only: %i[show], path: 'sign_up'
resource :registration, only: %i[create], path: 'new' do
get '' => :new, as: :new
end
end
end