Created
September 7, 2016 18:11
-
-
Save johnnaegle/9ba866fa9b3cf788943f14f1253f3969 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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