Instead of: > if first_name.blank? && last_name.blank? > 'Name: unknown' > else > first_name + ' ' + last_name > end One who prefers one-liners could do: "#{first_name} #{last_name}".strip.empty? ? "Name: unknown" : "#{first_name} #{last_name}" Furthermore, it's better to move such code to a helper method or a decorator using https://github.com/drapergem/draper