registrations_controller.rb 717 B

1234567891011121314151617181920
  1. # frozen_string_literal: true
  2. class Users::RegistrationsController < Devise::RegistrationsController
  3. # rubocop:disable LexicallyScopedActionFilter
  4. before_action :configure_sign_up_params, only: [:create]
  5. before_action :configure_account_update_params, only: [:update]
  6. # rubocop:enable LexicallyScopedActionFilter
  7. protected
  8. # If you have extra params to permit, append them to the sanitizer.
  9. def configure_sign_up_params
  10. devise_parameter_sanitizer.permit(:sign_up, keys: %i[email username])
  11. end
  12. # If you have extra params to permit, append them to the sanitizer.
  13. def configure_account_update_params
  14. devise_parameter_sanitizer.permit(:account_update, keys: %i[email username])
  15. end
  16. end