2
I’m a beginner in Ruby on Rails and need to add a Select field to the user registration form, so I can add a "Type" for the user to be registered. I intend to populate the fields automatically while editing and viewing a user record.
I am implementing a system for a Graphic, which has the profiles "User", "Director" and "Graphic". My Select was structured as follows on _form
user’s:
<div class="field">
<%= f.label :tipo %><br>
<%= f.select :tipo, ['usuario', 'grafica', 'diretor'] %>
</div>
Select values are not being entered in the bank! How should I proceed?
That column
tipo
really istipo
or istipo_id
? If it istipo_id
It needs to be changed there.– user7261
IS
tipo
even.tipo
is an attribute ofUsuarios
.– Igor de Medeiros
Do you mind [Edit] the question including the controller code?
– user7261