Sha256: 17bbc41ec81522afba77adc0291b7d3fa764b765462147107070d5c8e550ae7c

Contents?: true

Size: 1.23 KB

Versions: 1

Compression:

Stored size: 1.23 KB

Contents

= Overview

Provides 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.

= License

Copyright (c) 2007 David Heinemeier Hansson, released under the MIT license (see the LICENSE file).

= History

See the CHANGELOG file for more info.

= Requirements

* Rails 2.3.x or higher.

= Installation

Type the following from the command line to install:

* *UNIX*: sudo gem install aeonscope-acts_as_list
* *Windows*: gem install aeonscope-acts_as_list

Update your environment.rb file to include the new gem:

* config.gem "aeonscope-acts_as_list", :lib => "acts_as_list", :source => "http://gems.github.com"

= Usage

  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
		
= Contact/Feedback/Issues

* {Berserk Technologies}[http://www.berserktech.com] - Company web site.
* Aeonscope[http://www.aeonscope.net] - Personal web site.
* Twitter[http://www.twitter.com/Aeonscope] - Short bursts of insight and/or noise.

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
aeonscope-acts_as_list-1.0.0 README.rdoc