I lost a few hours while I puzzled my way through this one.
Let’s take an ActiveFedora model:
1 2 3 4 5 6 7 8 9 10
When our documents are created, by default, they aren’t public domain. Makes sense. Ok, but try and save this:
> doc = Document.create => false
Huh? And then I remembered—only after some time had passed—that methods will return the most recent
value of whatever was last called. So,
public_is_false was not only setting the property to false
but returning it as well. When the method returns false, that prevents it from saving.
1 2 3 4
Looks a bit odd, but it works!