I might a Ruby n00b here but the first condition will prolly never hit, because you're already doing a || '' in the previous line.