summaryrefslogtreecommitdiff
path: root/vendor/plugins/acts_as_list/README
diff options
context:
space:
mode:
authorhukl <hukl@eight.local>2009-01-31 13:04:43 +0100
committerhukl <hukl@eight.local>2009-01-31 13:04:43 +0100
commitbe83d467b5b6f92b0a6a175ee365d043f250d631 (patch)
tree87209c119576d1ac7ff7dcf26d3e65b706c91fef /vendor/plugins/acts_as_list/README
parent89d3dc4a676ee82cc6bad4d9d00535897318f1c3 (diff)
added acts_as_list plugin
Diffstat (limited to 'vendor/plugins/acts_as_list/README')
-rw-r--r--vendor/plugins/acts_as_list/README23
1 files changed, 23 insertions, 0 deletions
diff --git a/vendor/plugins/acts_as_list/README b/vendor/plugins/acts_as_list/README
new file mode 100644
index 00000000..36ae3188
--- /dev/null
+++ b/vendor/plugins/acts_as_list/README
@@ -0,0 +1,23 @@
1ActsAsList
2==========
3
4This acts_as extension provides the capabilities for sorting and reordering a number of objects in a list. The class that has this specified needs to have a +position+ column defined as an integer on the mapped database table.
5
6
7Example
8=======
9
10 class TodoList < ActiveRecord::Base
11 has_many :todo_items, :order => "position"
12 end
13
14 class TodoItem < ActiveRecord::Base
15 belongs_to :todo_list
16 acts_as_list :scope => :todo_list
17 end
18
19 todo_list.first.move_to_bottom
20 todo_list.last.move_higher
21
22
23Copyright (c) 2007 David Heinemeier Hansson, released under the MIT license \ No newline at end of file