Como puedo agregar un campo a la registracion?

Hola, necesito agregar un campo a la registracion de usuario, desde donde y como se lo agrego?, desde ya muchas gracias

Hi, i need to add a field in registration process. Where i have to touch to do this?
Tanks

Hola Maximiliano,

Para añadir un nuevo campo en el registro de usuarios puedes seguir los siguientes pasos:

  • Añadir una migración con el nuevo campo en el modelo User.
  • Añadir el nuevo campo en el método “sign_up_params” en el registration_controller.rb
  • Añadir el nuevo campo en la vista /app/views/users/registrations/new.html.erb

Cuando se quieren hacer personalizaciones en un fork existen unas buenas prácticas que puedes ver en la documentación: https://docs.consulproject.org/docs/spanish-documentation/customization/views_and_styles

Saludos!


Hi Maximiliano,

To add a new field in the user registration page you can follow the following steps:

  • Add a migration with the new field in the User model.
  • Add the new field in the “sign_up_params” method in the registration_controller.rb
  • Add the new field in the /app/views/users/registrations/new.html.erb view.

When you want to make customisations in a fork there are some best practices that you can see in the documentation: https://docs.consulproject.org/docs/english-documentation/customization/views_and_styles

Greetings!