For a commutative local ring R, we know that every ideal is a direct sum of local modules if and only if the unique maximal ideal of R is of the form , where and are principal ideal rings and for all γ’s. This motivates us to determine a commutative ring, not necessarily local, in which every (proper) ideal is a direct sum of local modules. We prove that such a ring is exactly a finite direct product of local rings R with the unique maximal ideal in the above mentioned form. Moreover, we characterize more precisely certain commutative rings such as Noetherian rings, reduced rings, Rickart rings, semi-Artinian rings and self-injective rings, in which every (proper) ideal is a direct sum of local modules.