wutang paul ڧѧ 04.07.2012 03:43:
> Hi, big time newbie here.
>
>
>     if actor_data['biography'].empty?
>       actor_data['biography'] = "Biography not available"
>     end
>
> Is there a shorter/better way to do this?
>
> Thanks for your help!

if actor_data['biography'].nil?
   actor_data['biography'] = "Biography not available"
end

is the same as

actor_data['biography'] ||= "Biography not available"

There is no shortcut for #empty? that I know, and probably no at all.

-- 
   WBR, Peter Zotov.