Remote form not rendering


#1

I am making a todo list application for learning purposes, but am
having problems with getting the ajax buttons to show up.

The below code does not render out any text. I did check the
category.name value and it works fine when not within the
form_remote_tag.

I do have the javascript libraries within the head tag.

In the final rendered output all I get is a bunch of li elements.

Thanks for any help.

  • <% form_remote_tag :url => {:action => :show_tasks, :id => category} do %> <%= submit_tag category.name %> <% end %>

  • #2

    Well it seems the issue was in the form_remote_tag. I used an older,
    deprecated, form tag and it then worked as it should.

    I have looked over the syntax in comparison to a number of examples a
    book I have, and I can’t see anything wrong with it, but there must be
    something.

    'The one that works

  • <%= form_remote_tag :url => {:action => :show_tasks, :id => category} %> <%= submit_tag category.name %> <%= end_form_tag %>