From: "ara.t.howard" Date: 2008-06-19T06:10:00+09:00 Subject: Re: Rather validate values or use exceptions? On Jun 18, 2008, at 1:26 PM, Joshua Muheim wrote: realized i should have been a bit more clear, you have at least two race conditions here 1) > if music_artist_id and MusicArtist.exists?(music_artist_id) record found, but deleted by another process > > @music_artist = MusicArtist.find(music_artist_id) raises RecordNotFound 2) > if music_artist_id and MusicArtist.exists?(music_artist_id) record claims no to exist another process creates it right here > > @music_artist = MusicArtist.find(music_artist_id) so we never execute this a @ http://codeforpeople.com/ -- we can deny everything, except that we have the possibility of being better. simply reflect on that. h.h. the 14th dalai lama