I'm going to work on a drag/drop interface for ordering pages. I'm confident that I can work out the front-end stuff.
For keeping track of orders of objects I really like this ranked-model Gem I read about in this post about sorting in Rails. I had considered writing the orders sequentially each time a save happened, but that would be a lot of expensive writing if there were a lot of items. I also considered serializing the order in a single field, but that doesn't work well when new objects are added.
This Gem is way smarter about it. It spreads the numbers out a ton so it usually will only do one write to manage order, but it can rewrite multiple items if it needs to.
I'm going to work on a drag/drop interface for ordering pages. I'm confident that I can work out the front-end stuff.
For keeping track of orders of objects I really like this ranked-model Gem I read about in this post about sorting in Rails. I had considered writing the orders sequentially each time a save happened, but that would be a lot of expensive writing if there were a lot of items. I also considered serializing the order in a single field, but that doesn't work well when new objects are added.
This Gem is way smarter about it. It spreads the numbers out a ton so it usually will only do one write to manage order, but it can rewrite multiple items if it needs to.