
Security News
Astral Launches pyx: A Python-Native Package Registry
Astral unveils pyx, a Python-native package registry in beta, designed to speed installs, enhance security, and integrate deeply with uv.
mongo_mapper_acts_as_list
Advanced tools
= mongo_mapper_acts_as_list
This is a port of classic Rails' {acts_as_list}[http://github.com/rails/acts_as_list] to Mongo Mapper. This MongoMapper plugin provides the capabilities for sorting and reordering a number of objects in a list. If you do not specify custom position column in the options, a key named position will be added and used by default.
It has (almost) the same functionality and passes the original test-suite. Scope needs to be defined as symbol or array of symbols. It does not work for Embedded Documents.
== Installation
Add this to your Gemfile and run the +bundle+ command:
gem 'mongo_mapper_acts_as_list'
== Example
class TodoList include MongoMapper::Document
many :todo_items, :order => "position"
end
class TodoItem include MongoMapper::Document include MongoMapper::Plugins::ActsAsList
key :todo_list_id, ObjectId
belongs_to :todo_list
acts_as_list :scope => :todo_list_id
end
todo_list.first.move_to_bottom todo_list.last.move_higher
== Note on Patches/Pull Requests
== Copyright
Original Rails' acts_as_list Copyright (c) 2007 David Heinemeier Hansson, released under the MIT license
FAQs
Unknown package
We found that mongo_mapper_acts_as_list demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Astral unveils pyx, a Python-native package registry in beta, designed to speed installs, enhance security, and integrate deeply with uv.
Security News
The Latio podcast explores how static and runtime reachability help teams prioritize exploitable vulnerabilities and streamline AppSec workflows.
Security News
The latest Opengrep releases add Apex scanning, precision rule tuning, and performance gains for open source static code analysis.