acts_as_list issue

The list i have defined in my acts_as_list will not let me drag the li
elements around. I am using FF, but IE6 also fails. Here is what i
have defined in my code:

model: listing.rb

class Listing < ActiveRecord::Base

view: index.rb

<h1>Listing listings</h1>

<div id="items">
<ul id="item_list">

<% for listing in @listings %>
  <li id="item_<%= %>">
    <%=h %>
    <%=h listing.completed_dt %>
    <%=h listing.position %>
<% end %>

<% sortable_element 'item_list', :url => { :action => "sort" }

<br />

<%= link_to 'New listing', new_listing_path %>

controller: listings_controller.rb

  def sort
  params[:item_list].each_index do |i|
    item = Listing.find(params[:item_list][i])
      item.position = i
    @list = Listing.find(:all, :order => 'position')
    render :layout => false, :action => :index

I also have all of the javascript includes in the layout and can see
them when i view source of the page.

What am i missing? or what is wrong with the code?


problem was the invalidauthenticitytoken