Forum: Ruby on Rails Rest from won't submit

Announcement (2017-05-07): is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see and for other Rails- und Ruby-related community platforms.
Temesta (Guest)
on 2007-02-26 18:07

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(, :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"

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?
This topic is locked and can not be replied to.