Forum: Ruby on Rails Rest from won't submit

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
01ff060e4998723d020cd0ad6fa8c7ad?d=identicon&s=25 Temesta (Guest)
on 2007-02-26 17:07
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?
This topic is locked and can not be replied to.