Hello, all, I am a little stuck on a exercise I am trying while learning RoR. I have a form I want to submit to my controller and have the results populate a div tag further down. I have rails 3.0 and ruby 1.8.7. When I try the following: Ajax List Demo
Listing posts
<%= javascript_include_tag 'prototype' %>
</head>
<body>
<h3>Add to list using Ajax</h3>
<%= form_remote_tag(:update => "list_profiles", :url => { :action => :list }) %>
New item text:
<%= text_field_tag :newitem %>
<%= submit_tag "Add item with Ajax" %>
<%= end_form_tag %>
<ul id="my_list">
<li>Original item... please add more!</li>
</ul>
</body>
</html>
I get this as the error:
undefined method `form_remote_tag' for #<#<Class:0x8448e88>:0x8447d48>
Can anyone tell me why I am getting this, and if there is a tutorial I should be reading about using ajax in rails forms? Thanks!