1
Method create
:
def create
# super
build_resource(sign_up_params)
Permission method:
def sign_up_params
params.require(:usuario).permit(:nome,
:email,
:password,
:password_confirmation,
:possui_planejador,
:profissional_id,
:tipo_profissional,
:nome_escritorio,
:subdominio_escritorio,
:tipo,
:especialidade => [],
perfil_attributes: [
:id,
:avatar,
:origem,
:cpf,
:cidade,
:estado,
:profissao,
:nome,
:telefone,
:data_nascimento,
{:certificacao_ids => []}
])
end
Whenever I wear rails s
to climb the server, it error in the method permit
. I have tried many things and I don’t know what to do. The version of Rails is the 5.1.0
, ruby 2.3.0
.
It is a user registration system, when creating a user, other tables are also created, as the user profile.
I’m using the Gem binding.pry
to debug and the devise
for authentication.
Can someone help me?
Error that appears:
Nomethoderror (Undefined method `Permit! ' for #Array:0x0055993ffdb370 Did you Mean? permutation): app/controllers/api/v1/registrations_controller.Rb:201:in 'sign_up_params'