Button "submit" with for_remote_for

Hello, Hello,

I am would like use button type=“submit”. I realised 2 tests :

  • one with standard form and an other with ajax form

<% form_for :name , @name , names_url, :html => { :method => :post } do
|f| %>
Bolo No Ajax
Tom No Ajax
<% end %>

This form workes. A new name was creates with no empty attributes.

<% form_remote_for :name ,:url => names_url, :html => { :method => :post
} do |f| %>
Bolo With Ajax
Tom With Ajax
<% end %>

In this form, the new name was created and save in dbb but his
attribute titre is empty.

my method create
def create
@name = Name.new params[:name]
@name.save!
respond_to do |type|
type.html { redirect_to names_path }
type.js {render}
end
end

Thanks for help

Dans la version ajex l’instance est bien créé et sauvegardé dans la bdd
mais je un valeur vide pour le tire