fix sign up redirect

pull/105/head 1.1.6
Alex Turchyn 2 years ago
parent 1060aa84ba
commit c9f39e7b1a

@ -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

Loading…
Cancel
Save