Skip to content
Browse files

Added readme

  • Loading branch information...
1 parent b3bb815 commit eb9841bebe2f1fff305742540e1ab0e935431c56 @pyromaniac committed Nov 12, 2011
Showing with 38 additions and 0 deletions.
  1. 0 README
  2. +38 −0 README.md
View
0 README
No changes.
View
38 README.md
@@ -0,0 +1,38 @@
+# What?
+
+Mongoid::Orderable is a ordered list implementation for your mongoid models.
+
+# Why?
+
+* It uses native mongo batch increment feature
+* It supports assignable api
+* It proper assingns position while moving document between scopes
+
+# How?
+
+```
+gem 'mongoid_orderable'
+```
+
+Gem has the same api as others. Just include Mongoid::Orderable into your model.
+Also you can initialize orderable manually and specify `:scope` or `:column` options:
+
+```
+class Item
+ include Mongoid::Document
+ include Mongoid::Orderable
+
+ # belongs_to :group
+
+ # orderable :scope => :group, :column => :pos
+ # orderable :scope => lambda { |document| where(:group_id => document.group_id) }
+end
+```
+
+# Contributing
+
+Fork && Patch && Spec && Push && Pull request.
+
+# License
+
+Mongoid::Orderable is released under the MIT license.

0 comments on commit eb9841b

Please sign in to comment.
Something went wrong with that request. Please try again.