def get(cls, resource_id, include_deactivated=False):
        """
        Get a resource

        :param resource_id: the resource ID
        :param include_deactivated: Include deactivated resources in response
        :returns: a SubResource instance
        :raises: SocketError, CouchException
        """
        if include_deactivated:
            resource = yield cls.view.first(key=resource_id, include_docs=True)
        else:
            resource = yield cls.active_view.first(key=resource_id, include_docs=True)
        parent = cls.parent_resource(**resource['doc'])

        raise Return(cls(parent=parent, **resource['value']))