From 753f791a076819e323909abcb85e3d7066a6d7e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christopher=20=C3=96zbek?= Date: Wed, 4 Dec 2024 14:41:59 +0100 Subject: [PATCH] Allow sign_up_params in GET /resource/sign_up This would allow to prefill the user's email on the sign-up page via URL params, which is allowed in the SessionController#new. --- app/controllers/devise/registrations_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/devise/registrations_controller.rb b/app/controllers/devise/registrations_controller.rb index f1292b4d90..67b0f37332 100644 --- a/app/controllers/devise/registrations_controller.rb +++ b/app/controllers/devise/registrations_controller.rb @@ -7,7 +7,7 @@ class Devise::RegistrationsController < DeviseController # GET /resource/sign_up def new - build_resource + build_resource(sign_up_params) yield resource if block_given? respond_with resource end