Skip to content

Instantly share code, notes, and snippets.

@johnnaegle
Created September 7, 2016 18:11
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 johnnaegle/9ba866fa9b3cf788943f14f1253f3969 to your computer and use it in GitHub Desktop.
Save johnnaegle/9ba866fa9b3cf788943f14f1253f3969 to your computer and use it in GitHub Desktop.
root = Node.create!
child = Node.create!(:parent => root, :value => 12)
grandchild = Node.create!(:parent => child)
root.effective_value # nil
child.effective_value # 12
grandchild.effective_value # 12 -- inherited from child
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment