开发者

Rails: problem with form

开发者 https://www.devze.com 2023-03-08 02:25 出处:网络
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 %>

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 p开发者_高级运维roblè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?


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?

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号