*Controller*

In your controller, get your list of items from the model like so:

<pre>
<code>
def list
	@items = List.find(:all)
end
</code>
</pre>

You'll need something to update the positions of your list items upon sorting as well. I admit, this might be heavy handed (meaning, it updates the position of each item in the model) but I don't know of any other way. This assumes you're using the position column as well:

<pre>
<code>
def update_positions
	i = 1
	@params[:sortable_list].each do |item_id|
		@item = ListItem.find(item_id)
		@item.position = i
		@item.save
		i += 1
	end
	@list = List.find(:all)	
	render :layout => false, :action => :list
end
</code>
</pre>

*View*

<pre>
<code>
<div id="items">
<ul id="sortable_list">
<% @items.each do |item| %>	
	<li id="item_<%= item.id %>"><%= item.value %></li>
<% end %>
</ul>
</div>

<%= sortable_element('items', :update => :list, :url => {:action => :update_positions}) %>
</code>
</pre>

The action shown in _url_ will be executed when the item is dropped, which will then update the positions, and finally grab the newly rendered list and drop it into the _items_ div.
