Rest from won't submit

Hi,

I’m having some troubles with my form. I have a list of
data(movies,games,…) and when the user clicks on add datatype, an RJS
template generates a new form. I’m building a restful application. So
this is the from that is inserted as a partial by my RJS template:

<% form_for :datatype,datatype,:url => datatypes_url(cat.id), :html => {
:method=> :POST } do |f| -%>
<%= f.text_field :name,:size=>15 %><%= submit_tag “Create” %>
<% end %>

then it should call this action in my controller:

def create
puts “create datatype”
end

I’m just doing a puts for sake of simplicity. When I submit the form, it
seems like rails is not responding at all. Webbrick won’t call the url.
However, when I put this form just on top of my page (not created by my
RJS template), it works perfectly.

Any ideas of what I’m doing wrong?