Are you sure you want to delete this task? Once this task is deleted, it cannot be recovered.
|
|
13 years ago | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| .. | |||||||||||
| lib/active_record/acts | first commit | 13 years ago | |||||||||
|
|
|||||||||||
| test | first commit | 13 years ago | |||||||||
|
|
|||||||||||
| README | first commit | 13 years ago | |||||||||
|
|
|||||||||||
| init.rb | first commit | 13 years ago | |||||||||
|
|
|||||||||||
ActsAsList
==========
This 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.
Example
=======
class TodoList < ActiveRecord::Base
has_many :todo_items, :order => "position"
end
class TodoItem < ActiveRecord::Base
belongs_to :todo_list
acts_as_list :scope => :todo_list
end
todo_list.first.move_to_bottom
todo_list.last.move_higher
Copyright (c) 2007 David Heinemeier Hansson, released under the MIT license
Are you sure you want to delete this task? Once this task is deleted, it cannot be recovered.
软件技术创新是当今国家整体创新能力的重要基础和发展引擎。近年来,大众参与的软件创新与创业活动已经成为网络时代软件开发和应用的新形态,正在快速改变着全球软件创新模式和软件产业格局。 ...
JavaScript Ruby HTML+ERB CSS SVG other