You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

22 lines
528 B

  1. class Auth::RegistrationsController < Devise::RegistrationsController
  2. layout 'auth'
  3. before_action :configure_sign_up_params, only: [:create]
  4. protected
  5. def build_resource(hash = nil)
  6. super(hash)
  7. resource.build_account if resource.account.nil?
  8. end
  9. def configure_sign_up_params
  10. devise_parameter_sanitizer.permit(:sign_up) do |u|
  11. u.permit({ account_attributes: [:username] }, :email, :password, :password_confirmation)
  12. end
  13. end
  14. def after_sign_up_path_for(_resource)
  15. root_path
  16. end
  17. end