Skip to content

Instantly share code, notes, and snippets.

@dapicester
Created July 29, 2015 08:12
Show Gist options
  • Save dapicester/e0dde9f9983b40497660 to your computer and use it in GitHub Desktop.
Save dapicester/e0dde9f9983b40497660 to your computer and use it in GitHub Desktop.
ActiveRecord and ActiveNode
class Concept
include Neo4j::ActiveNode
property :name
def references
Reference.where(concept_uuid: uuid)
end
end
# example: Concept.first.references
class Reference < ActiveRecord::Base
def concept
Concept.where(uuid: concept_uuid).first
end
end
# example: Reference.first.concept
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment