Skip to content

Instantly share code, notes, and snippets.

@walshyb
Created August 14, 2020 17:51
Show Gist options
  • Save walshyb/dc78b27ed5036236cca0ba6f100778f1 to your computer and use it in GitHub Desktop.
Save walshyb/dc78b27ed5036236cca0ba6f100778f1 to your computer and use it in GitHub Desktop.
Updated RegistrationsController that uses Contact association
class RegistrationsController < Devise::RegistrationsController
protected
def sign_up_params
params.require(:user).permit(
:password,
:password_confirmation,
contact: [
:name,
email_addresses_attributes: [ :email ]
]
)
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment