Bartlett Publishing has put together several lists of books available from many various publishers which are essential reading for anyone interested in the topic. Check them out today!
You can view the articles from the blogs which preceded these at the following URLs:
I always have trouble formulating exactly how sorts should work on Rails controllers that are called from sortable_element. Therefore, I created the following method for ApplicationController which helps out a lot:
def sort_assoc_members(assoc, ary, position_method = :position) ary.each_index do |ary_idx| assoc.find(ary[ary_idx]).update_attributes(position_method => (ary_idx + 1)) end end
Then, to use it, just create a sort action like this:
def reorder sort_assoc_members(WhateverItem, params[:whatever_list]) end
This makes life much easier.