1

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[:nom]
    p(tmp)
    render :partial => "adminpartial"
  end

The problème is that params[:nom] return alltime nil.

I think i'm not using correctly the params variable.

Does anyone have an idea about this?

1 Answer 1

3

Did you look at the params passed in your logs?

I guess you might find something in params[:user][:nom]as explained here.

BTW, did you carefully read this?

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.