Acts As Habtm List plugin

Plugin details

acts_as_habtm_list is a Ruby on Rails plugin, that can manage ordered lists through a join-table. It is providing almost the same Api as acts_as_list. The position column has to be defined in the join table.

Websitehttp://www.inlet-media.de/acts_as_habtm_list Repositoryhttp://svn.inlet-media.de/svn/rails_extensions/plugins/acts_as_habtm_list Author Norman Timmler Tags order, list LicenseUnknown

Documentation

Install the plugin:
ruby script/plugin install http://svn.inlet-media.de/svn/rails_extensions/plugins/acts_as_habtm_list

The difference to acts_as_list is, that scope children (ProductPresentation in this example) have to be loaded through the parent (Category) to ensure the scope is set in the children.

For moving a specific ProductPresentation (e.g. id = 13) one up, you have to load it through a parent Category (e.g. id = 1) :

Category.find(1).product_presentations.find(13).move_higher


You can install the plugin by running this command in your rails root:

script/plugin install http://svn.inlet-media.de/svn/rails_extensions/plugins/acts_as_habtm_list


The plugin should work from Rails 1.0.0 and higher.

The code is not very mature and is missing a test suit (contributors are welcome). If you find bugs or have other suggestions, send me a message.

Further Documentation

There is currently no advanced documentation for this plugin.

New documentation

Edit plugin | (0 older versions) | Last edited by: hardway, 7 months ago