Index: lib/reorder_page_controller_extensions.rb =================================================================== --- lib/reorder_page_controller_extensions.rb (revision 490) +++ lib/reorder_page_controller_extensions.rb (working copy) @@ -3,7 +3,7 @@ if request.post? sort_order = params[:sort_order].to_s.split(',').map { |i| Integer(i) rescue nil }.compact sort_order.each_with_index do |id, index| - Page.update(id, :position => index) + Page.update_all(['position = ?', index], ['id = ?', id]) end redirect_to page_index_url else