RailsCasts Pro episodes are now free!

Learn more or hide this

fabriciorodias's Profile

GitHub User: fabriciorodias

Comments by

Avatar

Hi, folks!

I'm having some issues here. I have Rails 3.1 and followed all the initial steps correctly.

The problem is that my "ul" list does not become "sortable". It does not work.

Here is my code:

drafts.js.coffee
jQuery ->
  $('#sortable').sortable()
_form.html.erb
# This partial is called by new and edit views from drafts_controller.rb

<ul id='sortable'>
<% @draft.clauses.each do |clause| %>
  <%= content_tag_for :li, clause do %>
    <%= link_to h(clause.name), clause_path(clause) %>
  <% end %>


<% end %>
</ul>

Thanks in advance!