Adding as_document method to support has_many relationships