The code powering m.abunchtell.com https://m.abunchtell.com
Non puoi selezionare più di 25 argomenti Gli argomenti devono iniziare con una lettera o un numero, possono includere trattini ('-') e possono essere lunghi fino a 35 caratteri.
 
 
 
 

23 righe
538 B

  1. class Auth::RegistrationsController < Devise::RegistrationsController
  2. layout 'auth'
  3. before_filter :configure_sign_up_params, only: [:create]
  4. protected
  5. def build_resource(hash = nil)
  6. super(hash)
  7. self.resource.build_account if self.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