I have a problem I can not resolve on a form
Here’s my view:
<h1>create manager </h1> <% form_tag :action => 'create_manager' do %> <%= text_area :user, :nom %><br/> <%= date_select :user, :date_embauche %> <%= submit_tag "Submit" %> <% end %>
and here is my controller:
def create_manager
tmp = params[:user][:date_embauche]
p(tmp)
tmp1 = params[:user][:nom]
p(tmp1)
render :partial => "adminpartial"
end
The problème is that params[:user][:nom] returns a correct result but params[:user][:date_embauche] returns alltime nil.
I think i’m not using correctly the params variable.
Does anyone have an idea about this?
UPDATE
Thank you both for your help.
I do not know why I have not directly had the idea to go see the log’-__-
The answer is:
tmp = params["user"]["date_embauche(1i)"]
with:
date_embauche(1i)
date_embauche(2i)
…
That is quite strange
date_selecthelper behavior