<% if @my_var %>
  My var is here!
<% else %>
  No var...
<% end %>