mirror of
https://github.com/docusealco/docuseal
synced 2026-11-09 07:42:32 -05:00
fix sign up redirect
This commit is contained in:
1 parent
1060aa84ba
commit
c9f39e7b1a
1 file changed
+8
@@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
class RegistrationsController < Devise::RegistrationsController
|
class RegistrationsController < Devise::RegistrationsController
|
||||||
prepend_before_action :require_no_authentication, only: [:show]
|
prepend_before_action :require_no_authentication, only: [:show]
|
||||||
|
prepend_before_action :maybe_redirect_if_signed_in, only: [:show]
|
||||||
|
|
||||||
def show; end
|
def show; end
|
||||||
|
|
||||||
@@ -23,6 +24,13 @@ class RegistrationsController < Devise::RegistrationsController
|
|||||||
super
|
super
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def maybe_redirect_if_signed_in
|
||||||
|
return unless signed_in?
|
||||||
|
return if params[:redir].blank?
|
||||||
|
|
||||||
|
redirect_to after_sign_up_path_for(current_user)
|
||||||
|
end
|
||||||
|
|
||||||
def require_no_authentication
|
def require_no_authentication
|
||||||
super
|
super
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user