We propose a description for the quasi-equilibrium self-assembly of small, single-stranded (ss) RNA viruses whose capsid proteins (CPs) have flexible, positively charged, disordered tails that associate with the negatively charged RNA genome molecules. We describe the assembly of such viruses as the interplay between two coupled phase-transition like events: the formation of the protein shell (the capsid) by CPs and the condensation of a large ss viral RNA molecule. Electrostatic repulsion between the CPs competes with attractive hydrophobic interactions and attractive interaction between neutralized RNA segments mediated by the tail-groups. An assembly diagram is derived in terms of the strength of attractive interactions between CPs and between CPs and the RNA molecules. It is compared with the results of recent studies of viral assembly. We demonstrate that the conventional theory of self-assembly, which does describe the assembly of textit{empty} capsids, is in general not applicable to the self-assembly of RNA-encapsidating virions.