An attribute-based ring signature scheme with constant size and constant number of pairings computation is proposed. The signer signs messages by using a subset of its attributes. All the users who possess the subset of these attributes form a ring. It requires that anyone cannot tell who generates the signature in this ring. Furthermore, anyone out of this ring could not forge the signature on behalf of the ring. It is proved to be unforgeable in the standard model and unconditionally anonymous. To the best of the authors' knowledge, such a construction is introduced for the first time.