about summary refs log tree commit diff
path: root/app/controllers/auth/registrations_controller.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/controllers/auth/registrations_controller.rb')
-rw-r--r--app/controllers/auth/registrations_controller.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/app/controllers/auth/registrations_controller.rb b/app/controllers/auth/registrations_controller.rb
index 83e784e4c..d2f1bea93 100644
--- a/app/controllers/auth/registrations_controller.rb
+++ b/app/controllers/auth/registrations_controller.rb
@@ -47,7 +47,7 @@ class Auth::RegistrationsController < Devise::RegistrationsController
     super(hash)
 
     resource.locale                 = I18n.locale
-    resource.invite_code            = params[:invite_code] if resource.invite_code.blank?
+    resource.invite_code            = @invite&.code if resource.invite_code.blank?
     resource.registration_form_time = session[:registration_form_time]
     resource.sign_up_ip             = request.remote_ip