Advertisement
Guest User

Untitled

a guest
Dec 6th, 2016
59
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.39 KB | None | 0 0
  1. before_action :configure_permitted_parameters, if: :devise_controller?
  2.  
  3. protected
  4.  
  5. def configure_permitted_parameters
  6. devise_parameter_sanitizer.for(:sign_up) { |u| u.permit({ roles: [] }, :email, :password, :password_confirmation, :username) }
  7.  
  8. devise_parameter_sanitizer.for(:account_update) { |u| u.permit({ roles: [] }, :email, :password, :password_confirmation, :current_password, :username) }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement