Module ActiveRecord::Acts::List::InstanceMethods
In: lib/active_record/acts/list.rb

All the methods available to a record that has had acts_as_list specified. Each method works by assuming the object to be the item in the list, so chapter.move_lower would move that chapter lower in the list of all chapters. Likewise, chapter.first? would return true if that chapter is the first in the list of all chapters.

Methods

Public Instance methods

Decrease the position of this item without adjusting the rest of the list.

Return true if this object is the first in the list.

Return the next higher item in the list.

Test if this record is in a list

Increase the position of this item without adjusting the rest of the list.

Insert the item at the given position (defaults to the top position of 1).

Return true if this object is the last in the list.

Return the next lower item in the list.

Swap positions with the next higher item, if one exists.

Swap positions with the next lower item, if one exists.

Move to the bottom of the list. If the item is already in the list, the items below it have their position adjusted accordingly.

Move to the top of the list. If the item is already in the list, the items above it have their position adjusted accordingly.

Removes the item from the list.

[Validate]