Sortable_element not working

I’m trying to create a simple sortable list and sortable_element is
not working. It’s throwing a javascript error that I cannot fix. I’ve
had sortable lists working in the past with other projects and this
does not seem to be any different to me, so I’m wondering if
something has changed. Here’s the error:

Error: element has no properties
Source File: http://localhost:3000/javascripts/dragdrop.js?1178825293
Line: 575

My view looks like this:

<%= h %>
    <% @work_area_tasks.each do |work_area_task| %>
  • <%= sort_button %><%= h %>
  • <% end %>
<%= link_to back_button, work_areas_path %> <%= sortable_element('work_area', :url => sort_work_area_path(@work_area)) %>

My routes.rb file is set up to create the “sort_work_area_path”

map.resources :work_areas, :member => { :sort_tasks => :get, :sort
=> :get }, :path_prefix => “/administration”

Any ideas? Am I doing something wrong?

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs