Skip to content

Instantly share code, notes, and snippets.

@alissonbrunosa
Last active February 18, 2016 14:30
Show Gist options
  • Save alissonbrunosa/6e66c8a235fa762c923b to your computer and use it in GitHub Desktop.
Save alissonbrunosa/6e66c8a235fa762c923b to your computer and use it in GitHub Desktop.
class RegistrationsController < Devise::RegistrationsController
before_action :configure_sign_up_params, only: [:create]
protected
def configure_sign_up_params
attributes = { pessoa_attributes: [:nome, :cpf, :telefone, :data_nascimento, :sexo] }
devise_parameter_sanitizer.for(:sign_up) << attributes
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment