I have such code:
= hidden_field(:user_id, nil, :value => params[:user_id])
But it is generating such html:
<input id="user_id_" name="user_id[]" type="hidden" value="1">
But what i need to write, to generate such html code:
<input id="user_id" name="user_id" type="hidden" value="1">
Without any arrays? Also, if i write only one input, without any form tags, will i see this value in params, or i must to write full: form_tag, then there hidden field?
Use hidden_field_tag