Skip to content
This repository has been archived by the owner on Sep 9, 2021. It is now read-only.

Commit

Permalink
readme updated
Browse files Browse the repository at this point in the history
  • Loading branch information
saks committed Apr 4, 2010
1 parent 8689a8d commit c5521dd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions README.rdoc
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ This is an implementation of a tree structure for Mongoid.

Install as gem

gem install saks-mongoid_acts_as_tree
gem install mongoid_acts_as_tree

== Usage

Expand All @@ -16,15 +16,15 @@ Enable the tree functionality by declaring acts_as_tree on your model
include Mongoid::Document
include Mongoid::Acts::Tree

key :name, String
field :name, String

acts_as_tree
end

The method accepts :parent_id_field, :path_field, :depth_field, :order as a hash.

:parent_id_field, :path_field, :depth_field => override the default field names
:order => control the order (format "_field-name_ _[asc|desc]_")
:order => control the order (format ['value', 'asc'] or [['field_1', 'asc'], ['field_2', 'desc']])

Check the test_tree.rb for examples.

Expand Down

0 comments on commit c5521dd

Please sign in to comment.