views:

47

answers:

1

Does anyone know why

%select{:name => "dropdown"} expand »
- for say_text in @available_says
%option = h say_text

in HAML resolves to

<select name='dropdown'></select>
<option>a</option>
<option>b</option>
<option>c</option>

in HTML? It's stymieing my dropdown completely and the documentation all says "That should work." I can't indent the third line properly because the HAML code explodes at that point. This is in Rails 2.3.8, btw.

+3  A: 

You need to reflect the document structure with correct indentation.

%select{:name => "dropdown"}
  - for say_text in @available_says
    %option= h say_text
Jeremy Weiskotten