I've set some documents to the property_objects of an activity_object like so:
@activity_object.object.property_objects << @document.activity_object
This allows me to do @activity_object.object.documents and I have a @activity_object.object.main_document.
How do I set the main_document to a different property_object? I've tried:
@activity_object.object.main_document = @document
where @document is some other property_object document for @activity_object. This gives me:
ActiveRecord::HasManyThroughNestedAssociationsAreReadonly (Cannot modify association 'ActivityObject#main_document' because it goes through more than one other association.):