|
2 | 2 |
|
3 | 3 | module Users |
4 | 4 | class RegistrationsController < Devise::RegistrationsController |
5 | | - # before_action :configure_sign_up_params, only: [:create] |
6 | | - # before_action :configure_account_update_params, only: [:update] |
| 5 | + before_action :configure_sign_up_params, only: [:create] |
| 6 | + before_action :configure_account_update_params, only: [:update] |
7 | 7 | # GET /resource/sign_up |
8 | 8 | # def new |
9 | 9 | # super |
@@ -41,19 +41,19 @@ class RegistrationsController < Devise::RegistrationsController |
41 | 41 | # protected |
42 | 42 |
|
43 | 43 | # If you have extra params to permit, append them to the sanitizer. |
44 | | - # def configure_sign_up_params |
45 | | - # devise_parameter_sanitizer.permit(:sign_up, keys: [:attribute]) |
46 | | - # end |
| 44 | + def configure_sign_up_params |
| 45 | + devise_parameter_sanitizer.permit(:sign_up, keys: [:username]) |
| 46 | + end |
47 | 47 |
|
48 | 48 | # If you have extra params to permit, append them to the sanitizer. |
49 | | - # def configure_account_update_params |
50 | | - # devise_parameter_sanitizer.permit(:account_update, keys: [:attribute]) |
51 | | - # end |
| 49 | + def configure_account_update_params |
| 50 | + devise_parameter_sanitizer.permit(:account_update, keys: [:username]) |
| 51 | + end |
52 | 52 |
|
53 | 53 | # The path used after sign up. |
54 | | - # def after_sign_up_path_for(resource) |
55 | | - # super(resource) |
56 | | - # end |
| 54 | + def after_sign_up_path_for(_resource) |
| 55 | + room_path |
| 56 | + end |
57 | 57 |
|
58 | 58 | # The path used after sign up for inactive accounts. |
59 | 59 | # def after_inactive_sign_up_path_for(resource) |
|
0 commit comments