2
I inserted a new column in my table contents
and also includes the field in the form with the same column name in the creation table (client_id)
, but this data is not entered when I create a new record.
I’ve already added the symbol
in the controller;
params.require(:content).permit(:title, :content, :client_alteration, :target, :scheduled_to, :status, :comment, :client_id)
THE HTML
<div class="field">
<%= f.label 'Cliente' %>
<%= select_tag 'client_id', options_from_collection_for_select(@clients, 'id', 'name') %>
Rafael, did you mean that Rails does not auto-increment your id ?
– iGallina