Skip to content

Instantly share code, notes, and snippets.

@andreasronge
Last active August 29, 2015 14:06
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save andreasronge/e4ba557fb061eae534bc to your computer and use it in GitHub Desktop.
Save andreasronge/e4ba557fb061eae534bc to your computer and use it in GitHub Desktop.
class Human
include Neo4j::ActiveNode
property :name
# A human can have outgoing relationships of type pets to animals
# The name of the generated accessor method will be the same as the relationship type: pets
has_many :out, :pets, type: :pets, model_class: :Animal
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment