pyromaniac/mongoid_orderable — pull request #26 by Bharat311 (2014-06-18 15:02:05+00:00)
Title: Adds support for multiple column (backwards compatible) - fixes #23

This PR allows defining multiple orderable columns like:

```
class Book
include Mongoid::Document
include Mongoid::Orderable

orderable
orderable column: serial, default: true
end
```

The code sets up a class_attribute **orderable_configurations** which is a hash of all the configurations and then generates helpers like:
```
@book.move_serial_to :top
@book.next_serial_items
```

This code change is backwards compatible, so existing implementations will also work.
```
@book.move_to! 3
@book.next_item
```

In these case, the default configuration (default: true) or the first configuration is used.

Tested it for Mongoid 2, 3, 4 on a Rails 3 app - https://github.com/bharat311/mongoid_orderable_demo