I've been reading this question (Ruby on Rails: Submitting an array in a form) but it didn't answer my question.
I have this form:
<div class="signup pull-right">
<div>
<p style="color: white">Create Doctor:</p>
<%= form_for(@doctor) do |d| %>
<%= d.text_field :name[1], :placeholder => "name" %>
<%= d.text_field :name[2], :placeholder => "surname" %>
<%= d.text_field :email, :placeholder => "email" %>
<%= d.text_field :password, :placeholder => "password" %>
<%= d.text_field :password_confirmation, :placeholder => "password confirmation" %>
<%= d.submit "Sumbit", class: "btn btn-small btn-primary pull-right", id: "boton" %>
<% end %>
</div>
where name is an array. What I want is to catch name and surname separately and join them inside name[]. I couldn't found the way to do it easily. Do you have any suggestion?
Thanks in advance.