Permalink
Browse files

Merge pull request #1 from strux/master

Fixed incorrect ordering of root nodes on drag-and-drop save
  • Loading branch information...
2 parents 406b156 + 36353ee commit b5aaff60f597ed6442427ccb06dac89b448de787 @matenia committed Jul 23, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 example_app/app/controllers/categories_controller.rb
View
2 example_app/app/controllers/categories_controller.rb
@@ -45,7 +45,7 @@ def destroy
# --- I WELCOME ANY SUGGESTIONS TO REFACTOR THIS (do the same with less database calls) ---
def array
# assign the sorted tree to a variable
- newlist = params[:ul]
+ newlist = params[:ul].sort
# initialize the previous item
previous = nil
#loop through each item in the new list (passed via ajax)

0 comments on commit b5aaff6

Please sign in to comment.