0

I would like to output this jsp in haml:

<select>
  <option ${page.defaultCar=="Volvo" ? "selected" : ""}>Volvo</option>
  <option ${page.defaultCar=="Saab" ? "selected" : ""}>Saab</option>
</select>

The solution how found at the moment is to escape the entire line line so:

\<option ${page.defaultCar=="Volvo" ? "selected" : ""}>Volvo</option>

Just wondering if there is a smarter way to do it.

Thank you ;)

a--m
  • 4,716
  • 1
  • 39
  • 59

1 Answers1

0

You can use this:

<option '${page.defaultCar=="Volvo" ? "selected" : ""}'>Volvo</option>
alexey28
  • 5,170
  • 1
  • 20
  • 25