pyromaniac/mongoid_orderable — pull request #12 by johnnyshields (2013-01-09 23:55:11+00:00)
Title: Added support for "base" in config options, in order to do a zero-based position

Added support for "base" in config options, in order to do a zero-based position. The default is 1, which keeps current behavior intact.

There is an added public accessor "orderable_base" to get this attribute.

Have added appropriate Rspec tests.

Have also bumped minor version. According to sem-ver it's an API change but does not break the existing API or change existing behavior.

Lastly, please look at the change to "bottom_orderable_position" method and confirm it is suitable. I believe are the ".map(&:to_i).max" part are Ruby array methods, not a mongo instruction, so it should affect performance.