From: Sam Duncan Date: 2012-07-04T09:18:21+09:00 Subject: Re: if x.condition, set x to y On 07/04/2012 11:59 AM, Ryan Davis wrote: > On Jul 3, 2012, at 16:43 , wutang paul wrote: > >> Hi, big time newbie here. > Welcome > >> if actor_data['biography'].empty? >> actor_data['biography'] = "Biography not available" >> end >> >> Is there a shorter/better way to do this? > No. It's great. > > You might want to look into using symbols for hash keys at some point... but it's not crucial. > > Or you could do; actor_data['biography'].empty?&& actor_data['biography'] = 'Biography not available' Sam