problem was the invalidauthenticitytoken

On Oct 29, 11:23 pm, tankow <[EMAIL PROTECTED]> wrote:
> 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
>         acts_as_list
> end
>
> view: index.rb
>
> <h1>Listing listings</h1>
>
> <div id="items">
> <ul id="item_list">
>
> <% for listing in @listings %>
>   <li id="item_<%= listing.id %>">
>     <%=h listing.name %>
>     <%=h listing.completed_dt %>
>     <%=h listing.position %>
>   </li>
> <% end %>
> </ul>
> </div>
>
> <% 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
>       item.save
>     end
>     @list = Listing.find(:all, :order => 'position')
>     render :layout => false, :action => :index
>   end
>
> 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?
>
> Thanks
> Phil
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to