Hi Bess,
The ActiveFedora version you have should be fine. You should just need to have relationships defined within the ActiveFedora models you are using that reference isMemberOf. It would be something like:
class MyAFClass1 < ActiveFedora::Base
has_relationship "member_of", :is_member_of
end
class MyAFClass2 < ActiveFedora::Base
has_relationship "members", :is_member_of, :inbound => true
end
Then you would be able to assert the relationship like:
obj1 = MyAFClass1.new
obj2 = MyAFClass2.new
obj1.member_of_append(obj2)
obj1.save
There are a few other ways to define the relationships depending on whether you want to assert the relationship from the child or from the parent (or both). The above example assumes the child maintains the relationship and therefore the parent becomes aware of the relationship via an "inbound" relationship. All that means is that when initializing its list of members objects it queries solr for any objects that assert a relationship of "is_member_of_s:info:fedora/[obj2.pid]".
Hopefully that is what you were looking for, but let me know if there are follow-up questions...
Rick