
Security News
New Website “Is It Really FOSS?” Tracks Transparency in Open Source Distribution Models
A new site reviews software projects to reveal if they’re truly FOSS, making complex licensing and distribution models easy to understand.
This is a port of the classic +acts_as_list+ to Neo4j.
This acts_as extension 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 used automatically.
gem install acts_as_list_neo4j
WARNING: This gem still requires refactoring. Currently, it only works OK for small workloads.
See the /specs folder specs that demontrate the API. Usage examples are located in the /examples folder.
To make a class Act as List, simply do:
include ActsAsList::Neo4j
And it will automatically set up a property and call acts_as_list with that property. By default the property name is :position.
You can change the defaut position_column name used: ActsAsList::Neo4j.default_position_column = :pos
.
For this class variable to be effetive, it should be set before calling include ActsAsList::Neo4j
.
class Item include Neo4j::ActiveNode include ActsAsList::Neo4j property :text end %w{'clean', 'wash', 'repair'}.each do |text| Item.new(text: text) end Item.first.move(:bottom) Item.last.move(:higher)
By default, when including ActsAsList::Neo4j, the property is set to :position and the acts_as_list column to :position. To change this:
include ActsAsList::Mongoid property :pos, type: Integer acts_as_list column: :pos
item.move(:highest) # moves to top of list. item.move(:lowest) # moves to bottom of list. item.move(:top) # moves to top of list. item.move(:bottom) # moves to bottom of list. item.move(:up) # moves one up (:higher and :up is the same) within the scope. item.move(:down) # moves one up (:lower and :down is the same) within the scope. item.move(to: position) # moves item to a specific position. item.move(above: other) # moves item above the other item.* item.move(below: other)
bundle exec rspec spec
FAQs
Unknown package
We found that acts_as_list_neo4j 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
A new site reviews software projects to reveal if they’re truly FOSS, making complex licensing and distribution models easy to understand.
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.