Skip to content

Instantly share code, notes, and snippets.

@walshyb
Last active August 14, 2020 17:22
Show Gist options
  • Save walshyb/1aa6c7579366c5669c1f8896f82ed0e9 to your computer and use it in GitHub Desktop.
Save walshyb/1aa6c7579366c5669c1f8896f82ed0e9 to your computer and use it in GitHub Desktop.
Overriding devise's RegistrationController to permit more params
# app/controllers/registrations_controller.rb
class RegistrationsController < Devise::RegistrationsController
protected
def sign_up_params
params.require(:user).permit(
:name,
:password,
:password_confirmation,
email_addresses: [
:email
]
)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment